pytest-clerk 4.0.4__tar.gz → 4.0.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytest-clerk
3
- Version: 4.0.4
3
+ Version: 4.0.5
4
4
  Summary: A set of pytest fixtures to help with integration testing with Clerk.
5
5
  License: MIT
6
6
  Author: Ryan Causey
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pytest-clerk"
3
- version = "4.0.4"
3
+ version = "4.0.5"
4
4
  description = "A set of pytest fixtures to help with integration testing with Clerk."
5
5
  license = "MIT"
6
6
  readme = "README.md"
@@ -291,9 +291,14 @@ def clerk_delete_org(clerk_backend_httpx_client):
291
291
  The API documentation for this call can be found below:
292
292
  https://clerk.com/docs/reference/backend-api/tag/Organizations#operation/DeleteOrganization
293
293
  """
294
- return clerk_backend_httpx_client.delete(
294
+ result = clerk_backend_httpx_client.delete(
295
295
  url=f"/organizations/{org_id}", **kwargs
296
296
  )
297
+ # Ignore 404 errors indicating it was already deleted. Raise other errors.
298
+ if result.status_code != httpx.codes.NOT_FOUND:
299
+ result.raise_for_status()
300
+
301
+ return result
297
302
 
298
303
  return _inner
299
304
 
@@ -427,7 +432,12 @@ def clerk_delete_user(clerk_backend_httpx_client):
427
432
  The API documentation for this call can be found below:
428
433
  https://clerk.com/docs/reference/backend-api/tag/Users#operation/DeleteUser
429
434
  """
430
- return clerk_backend_httpx_client.delete(url=f"/users/{user_id}", **kwargs)
435
+ result = clerk_backend_httpx_client.delete(url=f"/users/{user_id}", **kwargs)
436
+ # Ignore 404 errors indicating it was already deleted. Raise other errors.
437
+ if result.status_code != httpx.codes.NOT_FOUND:
438
+ result.raise_for_status()
439
+
440
+ return result
431
441
 
432
442
  return _inner
433
443
 
File without changes
File without changes