Skip to content

Commit eb4b017

Browse files
beck3905lbalmaceda
authored andcommitted
fixed typo by changing '.' to ',' (#179)
* fixed typo by changing '.' to ',' * added unit tests for auth0 object
1 parent b89731d commit eb4b017

2 files changed

Lines changed: 95 additions & 1 deletion

File tree

auth0/v3/management/auth0.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, domain, token):
3939
self.device_credentials = DeviceCredentials(domain, token)
4040
self.emails = Emails(domain, token)
4141
self.email_templates = EmailTemplates(domain, token)
42-
self.grants = Grants(domain.token)
42+
self.grants = Grants(domain, token)
4343
self.guardian = Guardian(domain, token)
4444
self.jobs = Jobs(domain, token)
4545
self.logs = Logs(domain, token)
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import unittest
2+
from ...management.auth0 import Auth0
3+
from ...management.blacklists import Blacklists
4+
from ...management.clients import Clients
5+
from ...management.client_grants import ClientGrants
6+
from ...management.connections import Connections
7+
from ...management.custom_domains import CustomDomains
8+
from ...management.device_credentials import DeviceCredentials
9+
from ...management.emails import Emails
10+
from ...management.email_templates import EmailTemplates
11+
from ...management.grants import Grants
12+
from ...management.guardian import Guardian
13+
from ...management.jobs import Jobs
14+
from ...management.logs import Logs
15+
from ...management.resource_servers import ResourceServers
16+
from ...management.rules import Rules
17+
from ...management.rules_configs import RulesConfigs
18+
from ...management.stats import Stats
19+
from ...management.tenants import Tenants
20+
from ...management.tickets import Tickets
21+
from ...management.user_blocks import UserBlocks
22+
from ...management.users import Users
23+
from ...management.users_by_email import UsersByEmail
24+
25+
26+
class TestAuth0(unittest.TestCase):
27+
28+
def setUp(self):
29+
self.domain = 'user.some.domain'
30+
self.token = 'a-token'
31+
self.a0 = Auth0(self.domain, self.token)
32+
33+
def test_blacklists(self):
34+
self.assertIsInstance(self.a0.blacklists, Blacklists)
35+
36+
def test_clients(self):
37+
self.assertIsInstance(self.a0.clients, Clients)
38+
39+
def test_client_grants(self):
40+
self.assertIsInstance(self.a0.client_grants, ClientGrants)
41+
42+
def test_custom_domains(self):
43+
self.assertIsInstance(self.a0.custom_domains, CustomDomains)
44+
45+
def test_connections(self):
46+
self.assertIsInstance(self.a0.connections, Connections)
47+
48+
def test_device_credentials(self):
49+
self.assertIsInstance(self.a0.device_credentials, DeviceCredentials)
50+
51+
def test_emails(self):
52+
self.assertIsInstance(self.a0.emails, Emails)
53+
54+
def test_email_templates(self):
55+
self.assertIsInstance(self.a0.email_templates, EmailTemplates)
56+
57+
def test_grants(self):
58+
self.assertIsInstance(self.a0.grants, Grants)
59+
60+
def test_guardian(self):
61+
self.assertIsInstance(self.a0.guardian, Guardian)
62+
63+
def test_jobs(self):
64+
self.assertIsInstance(self.a0.jobs, Jobs)
65+
66+
def test_logs(self):
67+
self.assertIsInstance(self.a0.logs, Logs)
68+
69+
def test_resource_servers(self):
70+
self.assertIsInstance(self.a0.resource_servers, ResourceServers)
71+
72+
def test_rules(self):
73+
self.assertIsInstance(self.a0.rules, Rules)
74+
75+
def test_rules_configs(self):
76+
self.assertIsInstance(self.a0.rules_configs, RulesConfigs)
77+
78+
def test_stats(self):
79+
self.assertIsInstance(self.a0.stats, Stats)
80+
81+
def test_tenants(self):
82+
self.assertIsInstance(self.a0.tenants, Tenants)
83+
84+
def test_tickets(self):
85+
self.assertIsInstance(self.a0.tickets, Tickets)
86+
87+
def test_user_blocks(self):
88+
self.assertIsInstance(self.a0.user_blocks, UserBlocks)
89+
90+
def test_users(self):
91+
self.assertIsInstance(self.a0.users, Users)
92+
93+
def test_users_by_email(self):
94+
self.assertIsInstance(self.a0.users_by_email, UsersByEmail)

0 commit comments

Comments
 (0)