Repository: auth0/auth0-python
Pull request #179 (2019-01-04 19:39:06)

fixed typo by changing '.' to ','

beck3905: @lbalmaceda - This is a very minor fix to a bug in the latest version that causes the management API not to work.  Could you please review and release this as soon as possible?  Thanks.
beck3905: @lbalmaceda - Done!

Patch:
diff --git a/auth0/v3/management/auth0.py b/auth0/v3/management/auth0.py
index b014d39..6d43bc5 100644
--- a/auth0/v3/management/auth0.py
+++ b/auth0/v3/management/auth0.py
@@ -39,7 +39,7 @@ class Auth0(object):
         self.device_credentials = DeviceCredentials(domain, token)
         self.emails = Emails(domain, token)
         self.email_templates = EmailTemplates(domain, token)
-        self.grants = Grants(domain.token)
+        self.grants = Grants(domain, token)
         self.guardian = Guardian(domain, token)
         self.jobs = Jobs(domain, token)
         self.logs = Logs(domain, token)


Test patch:
diff --git a/auth0/v3/test/management/test_auth0.py b/auth0/v3/test/management/test_auth0.py
new file mode 100644
index 0000000..2026ebe
--- /dev/null
+++ b/auth0/v3/test/management/test_auth0.py
@@ -0,0 +1,94 @@
+import unittest
+from ...management.auth0 import Auth0
+from ...management.blacklists import Blacklists
+from ...management.clients import Clients
+from ...management.client_grants import ClientGrants
+from ...management.connections import Connections
+from ...management.custom_domains import CustomDomains
+from ...management.device_credentials import DeviceCredentials
+from ...management.emails import Emails
+from ...management.email_templates import EmailTemplates
+from ...management.grants import Grants
+from ...management.guardian import Guardian
+from ...management.jobs import Jobs
+from ...management.logs import Logs
+from ...management.resource_servers import ResourceServers
+from ...management.rules import Rules
+from ...management.rules_configs import RulesConfigs
+from ...management.stats import Stats
+from ...management.tenants import Tenants
+from ...management.tickets import Tickets
+from ...management.user_blocks import UserBlocks
+from ...management.users import Users
+from ...management.users_by_email import UsersByEmail
+
+
+class TestAuth0(unittest.TestCase):
+
+    def setUp(self):
+        self.domain = 'user.some.domain'
+        self.token = 'a-token'
+        self.a0 = Auth0(self.domain, self.token)
+
+    def test_blacklists(self):
+        self.assertIsInstance(self.a0.blacklists, Blacklists)
+
+    def test_clients(self):
+        self.assertIsInstance(self.a0.clients, Clients)
+
+    def test_client_grants(self):
+        self.assertIsInstance(self.a0.client_grants, ClientGrants)
+
+    def test_custom_domains(self):
+        self.assertIsInstance(self.a0.custom_domains, CustomDomains)
+
+    def test_connections(self):
+        self.assertIsInstance(self.a0.connections, Connections)
+
+    def test_device_credentials(self):
+        self.assertIsInstance(self.a0.device_credentials, DeviceCredentials)
+
+    def test_emails(self):
+        self.assertIsInstance(self.a0.emails, Emails)
+
+    def test_email_templates(self):
+        self.assertIsInstance(self.a0.email_templates, EmailTemplates)
+
+    def test_grants(self):
+        self.assertIsInstance(self.a0.grants, Grants)
+
+    def test_guardian(self):
+        self.assertIsInstance(self.a0.guardian, Guardian)
+
+    def test_jobs(self):
+        self.assertIsInstance(self.a0.jobs, Jobs)
+
+    def test_logs(self):
+        self.assertIsInstance(self.a0.logs, Logs)
+
+    def test_resource_servers(self):
+        self.assertIsInstance(self.a0.resource_servers, ResourceServers)
+
+    def test_rules(self):
+        self.assertIsInstance(self.a0.rules, Rules)
+
+    def test_rules_configs(self):
+        self.assertIsInstance(self.a0.rules_configs, RulesConfigs)
+
+    def test_stats(self):
+        self.assertIsInstance(self.a0.stats, Stats)
+
+    def test_tenants(self):
+        self.assertIsInstance(self.a0.tenants, Tenants)
+
+    def test_tickets(self):
+        self.assertIsInstance(self.a0.tickets, Tickets)
+
+    def test_user_blocks(self):
+        self.assertIsInstance(self.a0.user_blocks, UserBlocks)
+
+    def test_users(self):
+        self.assertIsInstance(self.a0.users, Users)
+
+    def test_users_by_email(self):
+        self.assertIsInstance(self.a0.users_by_email, UsersByEmail)