auth0-python 4.10.0__tar.gz → 4.11.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. {auth0_python-4.10.0 → auth0_python-4.11.0}/PKG-INFO +2 -1
  2. {auth0_python-4.10.0 → auth0_python-4.11.0}/README.md +1 -0
  3. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/__init__.py +1 -1
  4. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/__init__.py +2 -0
  5. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/auth0.py +2 -0
  6. auth0_python-4.11.0/auth0/management/network_acls.py +138 -0
  7. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_auth0.py +4 -0
  8. auth0_python-4.11.0/auth0/test/management/test_network_acls.py +90 -0
  9. {auth0_python-4.10.0 → auth0_python-4.11.0}/pyproject.toml +3 -3
  10. {auth0_python-4.10.0 → auth0_python-4.11.0}/LICENSE +0 -0
  11. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/asyncify.py +0 -0
  12. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/__init__.py +0 -0
  13. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/async_token_verifier.py +0 -0
  14. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/back_channel_login.py +0 -0
  15. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/base.py +0 -0
  16. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/client_authentication.py +0 -0
  17. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/database.py +0 -0
  18. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/delegated.py +0 -0
  19. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/enterprise.py +0 -0
  20. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/get_token.py +0 -0
  21. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/passwordless.py +0 -0
  22. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/pushed_authorization_requests.py +0 -0
  23. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/revoke_token.py +0 -0
  24. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/social.py +0 -0
  25. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/token_verifier.py +0 -0
  26. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/authentication/users.py +0 -0
  27. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/exceptions.py +0 -0
  28. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/actions.py +0 -0
  29. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/async_auth0.py +0 -0
  30. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/attack_protection.py +0 -0
  31. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/blacklists.py +0 -0
  32. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/branding.py +0 -0
  33. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/client_credentials.py +0 -0
  34. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/client_grants.py +0 -0
  35. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/clients.py +0 -0
  36. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/connections.py +0 -0
  37. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/custom_domains.py +0 -0
  38. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/device_credentials.py +0 -0
  39. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/email_templates.py +0 -0
  40. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/emails.py +0 -0
  41. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/grants.py +0 -0
  42. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/guardian.py +0 -0
  43. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/hooks.py +0 -0
  44. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/jobs.py +0 -0
  45. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/log_streams.py +0 -0
  46. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/logs.py +0 -0
  47. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/organizations.py +0 -0
  48. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/prompts.py +0 -0
  49. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/resource_servers.py +0 -0
  50. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/roles.py +0 -0
  51. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/rules.py +0 -0
  52. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/rules_configs.py +0 -0
  53. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/self_service_profiles.py +0 -0
  54. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/stats.py +0 -0
  55. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/tenants.py +0 -0
  56. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/tickets.py +0 -0
  57. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/user_blocks.py +0 -0
  58. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/users.py +0 -0
  59. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/management/users_by_email.py +0 -0
  60. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/rest.py +0 -0
  61. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/rest_async.py +0 -0
  62. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/__init__.py +0 -0
  63. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/__init__.py +0 -0
  64. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_back_channel_login.py +0 -0
  65. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_base.py +0 -0
  66. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_database.py +0 -0
  67. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_delegated.py +0 -0
  68. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_enterprise.py +0 -0
  69. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_get_token.py +0 -0
  70. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_passwordless.py +0 -0
  71. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_pushed_authorization_requests.py +0 -0
  72. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_revoke_token.py +0 -0
  73. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_social.py +0 -0
  74. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_token_verifier.py +0 -0
  75. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/authentication/test_users.py +0 -0
  76. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/conftest.py +0 -0
  77. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/__init__.py +0 -0
  78. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_actions.py +0 -0
  79. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_atack_protection.py +0 -0
  80. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_blacklists.py +0 -0
  81. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_branding.py +0 -0
  82. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_client_credentials.py +0 -0
  83. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_client_grants.py +0 -0
  84. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_clients.py +0 -0
  85. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_connections.py +0 -0
  86. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_custom_domains.py +0 -0
  87. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_device_credentials.py +0 -0
  88. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_email_endpoints.py +0 -0
  89. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_emails.py +0 -0
  90. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_grants.py +0 -0
  91. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_guardian.py +0 -0
  92. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_hooks.py +0 -0
  93. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_jobs.py +0 -0
  94. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_log_streams.py +0 -0
  95. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_logs.py +0 -0
  96. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_organizations.py +0 -0
  97. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_prompts.py +0 -0
  98. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_resource_servers.py +0 -0
  99. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_rest.py +0 -0
  100. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_roles.py +0 -0
  101. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_rules.py +0 -0
  102. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_rules_configs.py +0 -0
  103. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_self_service_profiles.py +0 -0
  104. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_stats.py +0 -0
  105. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_tenants.py +0 -0
  106. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_tickets.py +0 -0
  107. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_user_blocks.py +0 -0
  108. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_users.py +0 -0
  109. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test/management/test_users_by_email.py +0 -0
  110. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test_async/__init__.py +0 -0
  111. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test_async/conftest.py +0 -0
  112. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test_async/test_async_auth0.py +0 -0
  113. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test_async/test_async_token_verifier.py +0 -0
  114. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/test_async/test_asyncify.py +0 -0
  115. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/types.py +0 -0
  116. {auth0_python-4.10.0 → auth0_python-4.11.0}/auth0/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: auth0-python
3
- Version: 4.10.0
3
+ Version: 4.11.0
4
4
  Summary:
5
5
  License: MIT
6
6
  Author: Auth0
@@ -141,6 +141,7 @@ For more code samples on how to integrate the auth0-python SDK in your Python ap
141
141
  - Jobs() ( `Auth0().jobs` )
142
142
  - LogStreams() ( `Auth0().log_streams` )
143
143
  - Logs() ( `Auth0().logs` )
144
+ - NetworkAcls() ( `Auth0().network_acls` )
144
145
  - Organizations() ( `Auth0().organizations` )
145
146
  - Prompts() ( `Auth0().prompts` )
146
147
  - ResourceServers() (`Auth0().resource_servers` )
@@ -116,6 +116,7 @@ For more code samples on how to integrate the auth0-python SDK in your Python ap
116
116
  - Jobs() ( `Auth0().jobs` )
117
117
  - LogStreams() ( `Auth0().log_streams` )
118
118
  - Logs() ( `Auth0().logs` )
119
+ - NetworkAcls() ( `Auth0().network_acls` )
119
120
  - Organizations() ( `Auth0().organizations` )
120
121
  - Prompts() ( `Auth0().prompts` )
121
122
  - ResourceServers() (`Auth0().resource_servers` )
@@ -1,5 +1,5 @@
1
1
  # This value is updated by `poetry_dynamic_versioning` during build time from the latest git tag
2
- __version__ = "4.10.0"
2
+ __version__ = "4.11.0"
3
3
 
4
4
  from auth0.exceptions import Auth0Error, RateLimitError, TokenValidationError
5
5
 
@@ -17,6 +17,7 @@ from .hooks import Hooks
17
17
  from .jobs import Jobs
18
18
  from .log_streams import LogStreams
19
19
  from .logs import Logs
20
+ from .network_acls import NetworkAcls
20
21
  from .organizations import Organizations
21
22
  from .resource_servers import ResourceServers
22
23
  from .roles import Roles
@@ -55,6 +56,7 @@ __all__ = (
55
56
  "Jobs",
56
57
  "LogStreams",
57
58
  "Logs",
59
+ "NetworkAcls"
58
60
  "Organizations",
59
61
  "ResourceServers",
60
62
  "Roles",
@@ -20,6 +20,7 @@ from .hooks import Hooks
20
20
  from .jobs import Jobs
21
21
  from .log_streams import LogStreams
22
22
  from .logs import Logs
23
+ from .network_acls import NetworkAcls
23
24
  from .organizations import Organizations
24
25
  from .prompts import Prompts
25
26
  from .resource_servers import ResourceServers
@@ -79,6 +80,7 @@ class Auth0:
79
80
  self.jobs = Jobs(domain, token, rest_options=rest_options)
80
81
  self.log_streams = LogStreams(domain, token, rest_options=rest_options)
81
82
  self.logs = Logs(domain, token, rest_options=rest_options)
83
+ self.network_acls = NetworkAcls(domain, token, rest_options=rest_options)
82
84
  self.organizations = Organizations(domain, token, rest_options=rest_options)
83
85
  self.prompts = Prompts(domain, token, rest_options=rest_options)
84
86
  self.resource_servers = ResourceServers(
@@ -0,0 +1,138 @@
1
+ from __future__ import annotations
2
+
3
+ from typing import Any, List # List is being used as list is already a method.
4
+
5
+ from ..rest import RestClient, RestClientOptions
6
+ from ..types import TimeoutType
7
+
8
+
9
+ class NetworkAcls:
10
+ """Auth0 Netwrok Acls endpoints
11
+
12
+ Args:
13
+ domain (str): Your Auth0 domain, e.g: 'username.auth0.com'
14
+
15
+ token (str): Management API v2 Token
16
+
17
+ telemetry (bool, optional): Enable or disable Telemetry
18
+ (defaults to True)
19
+
20
+ timeout (float or tuple, optional): Change the requests
21
+ connect and read timeout. Pass a tuple to specify
22
+ both values separately or a float to set both to it.
23
+ (defaults to 5.0 for both)
24
+
25
+ protocol (str, optional): Protocol to use when making requests.
26
+ (defaults to "https")
27
+
28
+ rest_options (RestClientOptions): Pass an instance of
29
+ RestClientOptions to configure additional RestClient
30
+ options, such as rate-limit retries.
31
+ (defaults to None)
32
+ """
33
+
34
+ def __init__(
35
+ self,
36
+ domain: str,
37
+ token: str,
38
+ telemetry: bool = True,
39
+ timeout: TimeoutType = 5.0,
40
+ protocol: str = "https",
41
+ rest_options: RestClientOptions | None = None,
42
+ ) -> None:
43
+ self.domain = domain
44
+ self.protocol = protocol
45
+ self.client = RestClient(
46
+ jwt=token, telemetry=telemetry, timeout=timeout, options=rest_options
47
+ )
48
+
49
+ def _url(self, id: str | None = None) -> str:
50
+ url = f"{self.protocol}://{self.domain}/api/v2/network-acls"
51
+ if id is not None:
52
+ return f"{url}/{id}"
53
+ return url
54
+
55
+ def all(
56
+ self,
57
+ page: int = 0,
58
+ per_page: int = 25,
59
+ include_totals: bool = True,
60
+ ) -> List[dict[str, Any]]:
61
+ """List self-service profiles.
62
+
63
+ Args:
64
+ page (int, optional): The result's page number (zero based). By default,
65
+ retrieves the first page of results.
66
+
67
+ per_page (int, optional): The amount of entries per page. By default,
68
+ retrieves 25 results per page.
69
+
70
+ include_totals (bool, optional): True if the query summary is
71
+ to be included in the result, False otherwise. Defaults to True.
72
+
73
+ See: https://auth0.com/docs/api/management/v2/network-acls/get-network-acls
74
+ """
75
+
76
+ params = {
77
+ "page": page,
78
+ "per_page": per_page,
79
+ "include_totals": str(include_totals).lower(),
80
+ }
81
+
82
+ return self.client.get(self._url(), params=params)
83
+
84
+ def create(self, body: dict[str, Any]) -> dict[str, Any]:
85
+ """Create a new self-service profile.
86
+
87
+ Args:
88
+ body (dict): Attributes for the new access control list.
89
+
90
+ See: https://auth0.com/docs/api/management/v2/network-acls/post-network-acls
91
+ """
92
+
93
+ return self.client.post(self._url(), data=body)
94
+
95
+ def get(self, id: str) -> dict[str, Any]:
96
+ """Get a self-service profile.
97
+
98
+ Args:
99
+ id (str): The id of the access control list to retrieve.
100
+
101
+ See: https://auth0.com/docs/api/management/v2/network-acls/get-network-acls-by-id
102
+ """
103
+
104
+ return self.client.get(self._url(id))
105
+
106
+ def delete(self, id: str) -> None:
107
+ """Delete a self-service profile.
108
+
109
+ Args:
110
+ id (str): The id of the access control list to delete.
111
+
112
+ See: https://auth0.com/docs/api/management/v2/network-acls/delete-network-acls-by-id
113
+ """
114
+
115
+ self.client.delete(self._url(id))
116
+
117
+ def update(self, id: str, body: dict[str, Any]) -> dict[str, Any]:
118
+ """Update a access control list.
119
+
120
+ Args:
121
+ id (str): The id of the access control list to update.
122
+
123
+ body (dict): Attributes of the access control list to modify.
124
+
125
+ See: https://auth0.com/docs/api/management/v2/network-acls/put-network-acls-by-id
126
+ """
127
+
128
+ return self.client.put(self._url(id), data=body)
129
+
130
+ def update_partial(self, id: str, body: dict[str, Any]) -> dict[str, Any]:
131
+ """Update partially the access control list.
132
+
133
+ See: https://auth0.com/docs/api/management/v2/network-acls/patch-network-acls-by-id
134
+ """
135
+
136
+ return self.client.patch(self._url(id), data=body)
137
+
138
+
@@ -18,6 +18,7 @@ from ...management.hooks import Hooks
18
18
  from ...management.jobs import Jobs
19
19
  from ...management.log_streams import LogStreams
20
20
  from ...management.logs import Logs
21
+ from ...management.network_acls import NetworkAcls
21
22
  from ...management.organizations import Organizations
22
23
  from ...management.prompts import Prompts
23
24
  from ...management.resource_servers import ResourceServers
@@ -89,6 +90,9 @@ class TestAuth0(unittest.TestCase):
89
90
 
90
91
  def test_logs(self):
91
92
  self.assertIsInstance(self.a0.logs, Logs)
93
+
94
+ def test_network_acls(self):
95
+ self.assertIsInstance(self.a0.network_acls, NetworkAcls)
92
96
 
93
97
  def test_organizations(self):
94
98
  self.assertIsInstance(self.a0.organizations, Organizations)
@@ -0,0 +1,90 @@
1
+ import unittest
2
+ from unittest import mock
3
+
4
+ from ...management.network_acls import NetworkAcls
5
+
6
+
7
+ class TestNetworkAcls(unittest.TestCase):
8
+ def test_init_with_optionals(self):
9
+ t = NetworkAcls(
10
+ domain="domain", token="jwttoken", telemetry=False, timeout=(10, 2)
11
+ )
12
+ self.assertEqual(t.client.options.timeout, (10, 2))
13
+ telemetry_header = t.client.base_headers.get("Auth0-Client", None)
14
+ self.assertEqual(telemetry_header, None)
15
+
16
+ @mock.patch("auth0.management.network_acls.RestClient")
17
+ def test_all(self, mock_rc):
18
+ mock_instance = mock_rc.return_value
19
+
20
+ s = NetworkAcls(domain="domain", token="jwttoken")
21
+ s.all()
22
+
23
+ mock_instance.get.assert_called_with(
24
+ "https://domain/api/v2/network-acls",
25
+ params={"page": 0, "per_page": 25, "include_totals": "true"},
26
+ )
27
+
28
+ s.all(page=1, per_page=50, include_totals=False)
29
+
30
+ mock_instance.get.assert_called_with(
31
+ "https://domain/api/v2/network-acls",
32
+ params={"page": 1, "per_page": 50, "include_totals": "false"},
33
+ )
34
+
35
+ @mock.patch("auth0.management.network_acls.RestClient")
36
+ def test_create(self, mock_rc):
37
+ mock_instance = mock_rc.return_value
38
+
39
+ s = NetworkAcls(domain="domain", token="jwttoken")
40
+ s.create({"name": "test"})
41
+
42
+ mock_instance.post.assert_called_with(
43
+ "https://domain/api/v2/network-acls", data={"name": "test"}
44
+ )
45
+
46
+ @mock.patch("auth0.management.network_acls.RestClient")
47
+ def test_get(self, mock_rc):
48
+ mock_instance = mock_rc.return_value
49
+
50
+ s = NetworkAcls(domain="domain", token="jwttoken")
51
+ s.get("an-id")
52
+
53
+ mock_instance.get.assert_called_with(
54
+ "https://domain/api/v2/network-acls/an-id"
55
+ )
56
+
57
+ @mock.patch("auth0.management.network_acls.RestClient")
58
+ def test_delete(self, mock_rc):
59
+ mock_instance = mock_rc.return_value
60
+
61
+ s = NetworkAcls(domain="domain", token="jwttoken")
62
+ s.delete("an-id")
63
+
64
+ mock_instance.delete.assert_called_with(
65
+ "https://domain/api/v2/network-acls/an-id"
66
+ )
67
+
68
+ @mock.patch("auth0.management.network_acls.RestClient")
69
+ def test_update(self, mock_rc):
70
+ mock_instance = mock_rc.return_value
71
+
72
+ s = NetworkAcls(domain="domain", token="jwttoken")
73
+ s.update("an-id", {"a": "b", "c": "d"})
74
+
75
+ mock_instance.put.assert_called_with(
76
+ "https://domain/api/v2/network-acls/an-id",
77
+ data={"a": "b", "c": "d"},
78
+ )
79
+
80
+ @mock.patch("auth0.management.network_acls.RestClient")
81
+ def test_update_partial(self, mock_rc):
82
+ mock_instance = mock_rc.return_value
83
+
84
+ s = NetworkAcls(domain="domain", token="jwttoken")
85
+ s.update_partial("an-id", {"a": "b", "c": "d"})
86
+
87
+ mock_instance.patch.assert_called_with(
88
+ "https://domain/api/v2/network-acls/an-id",
89
+ data={"a": "b", "c": "d"},
90
+ )
@@ -4,7 +4,7 @@ build-backend = "poetry_dynamic_versioning.backend"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "auth0-python"
7
- version = "4.10.0" # This is replaced by dynamic versioning
7
+ version = "4.11.0" # This is replaced by dynamic versioning
8
8
  description = ""
9
9
  authors = ["Auth0 <support@auth0.com>"]
10
10
  license = "MIT"
@@ -34,11 +34,11 @@ requests = ">=2.32.3"
34
34
  urllib3 = ">=2.2.3" # requests has a weak dependency on urllib3
35
35
 
36
36
  [tool.poetry.group.dev.dependencies]
37
- aioresponses = "^0.7.4"
37
+ aioresponses = "^0.7.8"
38
38
  mock = "^5.1.0"
39
39
  pipx = "^1.7.1"
40
40
  pytest = "^7.4.0"
41
41
  pytest-aiohttp = "^1.0.4"
42
42
  pytest-asyncio = ">=0.21.1,<0.24.0"
43
43
  pytest-cov = "^4.1.0"
44
- responses = ">=0.23.3,<0.25.0"
44
+ responses = ">=0.23.3,<0.26.0"
File without changes