pytest-clerk 1.0.1__py3-none-any.whl → 2.0.0__py3-none-any.whl
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.
- pytest_clerk/clerk.py +33 -0
- {pytest_clerk-1.0.1.dist-info → pytest_clerk-2.0.0.dist-info}/METADATA +3 -3
- pytest_clerk-2.0.0.dist-info/RECORD +7 -0
- pytest_clerk-1.0.1.dist-info/RECORD +0 -7
- {pytest_clerk-1.0.1.dist-info → pytest_clerk-2.0.0.dist-info}/LICENSE +0 -0
- {pytest_clerk-1.0.1.dist-info → pytest_clerk-2.0.0.dist-info}/WHEEL +0 -0
- {pytest_clerk-1.0.1.dist-info → pytest_clerk-2.0.0.dist-info}/entry_points.txt +0 -0
pytest_clerk/clerk.py
CHANGED
|
@@ -183,6 +183,39 @@ def clerk_create_org(clerk_backend_httpx_client, clerk_delete_org):
|
|
|
183
183
|
clerk_delete_org(org_id=org["id"])
|
|
184
184
|
|
|
185
185
|
|
|
186
|
+
@pytest.fixture
|
|
187
|
+
def clerk_update_org(clerk_backend_httpx_client):
|
|
188
|
+
"""This fixture provides a function to update an organization with the provided
|
|
189
|
+
`organization_data`. All additional kwargs are passed through to the
|
|
190
|
+
httpx.Client.patch call.
|
|
191
|
+
|
|
192
|
+
The API documentation for this call can be found below:
|
|
193
|
+
https://clerk.com/docs/reference/backend-api/tag/Organizations#operation/UpdateOrganization
|
|
194
|
+
"""
|
|
195
|
+
|
|
196
|
+
@retry(
|
|
197
|
+
retry=retry_if_exception(predicate=retry_predicate),
|
|
198
|
+
wait=wait_random_exponential(multiplier=0.5, max=60),
|
|
199
|
+
)
|
|
200
|
+
def _inner(org_id_or_slug, organization_data, **kwargs):
|
|
201
|
+
"""This function attempts to update an organization with the provided
|
|
202
|
+
`organization_data`. All additional kwargs are passed through to the
|
|
203
|
+
httpx.Client.patch call.
|
|
204
|
+
|
|
205
|
+
This will retry rate limit errors.
|
|
206
|
+
|
|
207
|
+
The API documentation for this call can be found below:
|
|
208
|
+
https://clerk.com/docs/reference/backend-api/tag/Organizations#operation/UpdateOrganization
|
|
209
|
+
"""
|
|
210
|
+
result = clerk_backend_httpx_client.patch(
|
|
211
|
+
url=f"/organizations/{org_id_or_slug}", json=organization_data, **kwargs
|
|
212
|
+
)
|
|
213
|
+
result.raise_for_status()
|
|
214
|
+
return result.json()
|
|
215
|
+
|
|
216
|
+
yield _inner
|
|
217
|
+
|
|
218
|
+
|
|
186
219
|
@pytest.fixture
|
|
187
220
|
def clerk_get_org(clerk_backend_httpx_client):
|
|
188
221
|
"""This fixture provides a function to get an organization by its ID or slug. All
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pytest-clerk
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: A set of pytest fixtures to help with integration testing with Clerk.
|
|
5
5
|
Home-page: https://gitlab.com/munipal-oss/pytest-clerk
|
|
6
6
|
License: MIT
|
|
@@ -16,9 +16,9 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
16
16
|
Provides-Extra: aws
|
|
17
17
|
Requires-Dist: httpx (>=0.27.0,<0.28.0)
|
|
18
18
|
Requires-Dist: pytest (>=8.0.0,<9.0.0)
|
|
19
|
-
Requires-Dist: pytest-aws-fixtures (>=
|
|
19
|
+
Requires-Dist: pytest-aws-fixtures (>=2.0.0,<3.0.0) ; extra == "aws"
|
|
20
20
|
Requires-Dist: python-decouple (>=3.0,<4.0)
|
|
21
|
-
Requires-Dist: tenacity (>=
|
|
21
|
+
Requires-Dist: tenacity (>=9.0.0,<10.0.0)
|
|
22
22
|
Project-URL: Repository, https://gitlab.com/munipal-oss/pytest-clerk
|
|
23
23
|
Description-Content-Type: text/markdown
|
|
24
24
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
pytest_clerk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
pytest_clerk/clerk.py,sha256=HPdH2Xr2Xany8rkbo8g2h9s-fia6K960AXnOV1J8ZWI,17462
|
|
3
|
+
pytest_clerk-2.0.0.dist-info/LICENSE,sha256=QLSYHsNt-ZLbbVtDs7h8o8v-V0SlK2BuGe7LmoPOasU,1064
|
|
4
|
+
pytest_clerk-2.0.0.dist-info/METADATA,sha256=WFi4sGrY2GUdJuMyzeH79QC4-ZVpSLU6RjCwF8qRteY,1631
|
|
5
|
+
pytest_clerk-2.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
+
pytest_clerk-2.0.0.dist-info/entry_points.txt,sha256=ps5MgIGlDiWP4lufTAzoQhfwL-GA7rJquc1bqnVR-oA,44
|
|
7
|
+
pytest_clerk-2.0.0.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
pytest_clerk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
pytest_clerk/clerk.py,sha256=uKjUxV5EJYl8iu6QFAJUaqiVhs39jpLXN25ZdCQUmp8,16204
|
|
3
|
-
pytest_clerk-1.0.1.dist-info/LICENSE,sha256=QLSYHsNt-ZLbbVtDs7h8o8v-V0SlK2BuGe7LmoPOasU,1064
|
|
4
|
-
pytest_clerk-1.0.1.dist-info/METADATA,sha256=iQCjkjPtWMY-hu1ikD4m36PuV_wqiE1tYQ6gGPs1Fx0,1630
|
|
5
|
-
pytest_clerk-1.0.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
6
|
-
pytest_clerk-1.0.1.dist-info/entry_points.txt,sha256=ps5MgIGlDiWP4lufTAzoQhfwL-GA7rJquc1bqnVR-oA,44
|
|
7
|
-
pytest_clerk-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|