feat: org router endpoint cleanup
`/id/` removed from GET Trailing `/` removed from POST and DELETE
This commit is contained in:
parent
806bbfcbfc
commit
81a4cc6cca
3 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue