tests: expanded assertions
Some checks failed
ci / lint_and_test (push) Failing after 8s

New assertions added for new data being delivered (eg IDs on endpoints not previously serving IDs)
This commit is contained in:
Chris Milne 2026-06-09 14:43:52 +01:00
parent 607f736453
commit 76e889d836
4 changed files with 110 additions and 35 deletions

View file

@ -20,6 +20,7 @@ async def test_get_services_success(default_client: AsyncClient):
assert resp.status_code == 200
assert "services" in data
assert isinstance(data["services"], list)
assert data["services"][0]["id"] == 1
assert data["services"][0]["name"] == "Test Service"
@ -43,6 +44,7 @@ async def test_post_service_success(default_client: AsyncClient):
assert resp.status_code == 200
assert "service" in data
assert isinstance(data["service"], dict)
assert data["service"]["name"] == "New Test Service"
assert data["service"]["id"] == 2
assert isinstance(data["service"]["api_key"], str)
@ -72,6 +74,7 @@ async def test_patch_service_success(default_client: AsyncClient):
assert resp.status_code == 200
assert "service" in data
assert isinstance(data["service"], dict)
assert data["service"]["name"] == "Test Service"
assert data["service"]["id"] == 1
assert isinstance(data["service"]["api_key"], str)