feat: org router endpoint cleanup

`/id/` removed from GET
Trailing `/` removed from POST and DELETE
This commit is contained in:
Chris Milne 2026-06-02 16:23:29 +01:00
parent 806bbfcbfc
commit 81a4cc6cca
3 changed files with 8 additions and 8 deletions

View file

@ -11,7 +11,7 @@ from .conftest import client
@pytest.mark.anyio
async def test_get_org_success(client: AsyncClient):
resp = await client.get("/org/id?org_id=1")
resp = await client.get("/org?org_id=1")
data = resp.json()
assert resp.status_code == 200
@ -33,14 +33,14 @@ async def test_get_org_success(client: AsyncClient):
)
@pytest.mark.anyio
async def test_get_org_failure(client: AsyncClient, query: str, expected_status: int):
resp = await client.get(f"/org/id?{query}")
resp = await client.get(f"/org?{query}")
assert resp.status_code == expected_status
@pytest.mark.anyio
async def test_post_org_success(client: AsyncClient):
resp = await client.post("/org/", json={"name": "New Test Org"})
resp = await client.post("/org", json={"name": "New Test Org"})
data = resp.json()
assert resp.status_code == 201
@ -58,7 +58,7 @@ async def test_post_org_success(client: AsyncClient):
)
@pytest.mark.anyio
async def test_post_org_failure(client: AsyncClient, body: dict[str, str], expected_status: int):
resp = await client.post("/org/", json=body)
resp = await client.post("/org", json=body)
assert resp.status_code == expected_status