1
0
Fork 0
forked from sr2/cloud-api

feat: delete endpoint queries

Delete endpoints do not fully support bodies. Queries used instead.

Tests added.

Resolves #20
This commit is contained in:
Chris Milne 2026-06-09 09:09:41 +01:00
parent e9b272811f
commit c452c6c0d5
13 changed files with 114 additions and 57 deletions

View file

@ -491,3 +491,26 @@ async def test_patch_org_contact_status_checks(
resp = await default_client.patch("/org/contact", json=body)
assert resp.status_code == expected_status
@pytest.mark.anyio
async def test_delete_org_success(default_client: AsyncClient):
resp = await default_client.delete("/org?org_id=1")
assert resp.status_code == 204
@pytest.mark.anyio
async def test_delete_org_users_success(db_session, default_client: AsyncClient):
db_session.add(
User(
email="user@test.org",
first_name="User",
last_name="Test",
oidc_id="abcd-efgh-ijkl-1234",
)
)
db_session.flush()
resp = await default_client.delete("/org/user?org_id=1&user_id=2")
assert resp.status_code == 204