update tests for proper HTTP status codes
This commit is contained in:
@@ -97,5 +97,4 @@ class TestAgentRuns:
|
|||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_unknown_run(self, agent_client):
|
async def test_unknown_run(self, agent_client):
|
||||||
res = await agent_client.get(E.run("nonexistent"))
|
res = await agent_client.get(E.run("nonexistent"))
|
||||||
H.assert_status(res, 200)
|
H.assert_status(res, 404)
|
||||||
assert "error" in res.json()
|
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ class TestFlights:
|
|||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_patch_unknown_flight(self, client):
|
async def test_patch_unknown_flight(self, client):
|
||||||
res = await client.patch(E.flight("FAKE"), json={"delay_minutes": 10})
|
res = await client.patch(E.flight("FAKE"), json={"delay_minutes": 10})
|
||||||
H.assert_status(res, 200)
|
H.assert_status(res, 404)
|
||||||
assert "error" in res.json()
|
|
||||||
|
|
||||||
|
|
||||||
class TestCrew:
|
class TestCrew:
|
||||||
|
|||||||
@@ -49,5 +49,4 @@ class TestActiveScenario:
|
|||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_switch_invalid(self, client):
|
async def test_switch_invalid(self, client):
|
||||||
res = await client.put(E.SCENARIO_ACTIVE, json={"scenario_id": "nonexistent"})
|
res = await client.put(E.SCENARIO_ACTIVE, json={"scenario_id": "nonexistent"})
|
||||||
H.assert_status(res, 200)
|
H.assert_status(res, 400)
|
||||||
assert "error" in res.json()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user