From c8a764c8686266b8b507e45b2e17765c8f76fddc Mon Sep 17 00:00:00 2001 From: buenosairesam Date: Tue, 14 Apr 2026 11:18:11 -0300 Subject: [PATCH] update tests for proper HTTP status codes --- tests/test_agents.py | 3 +-- tests/test_scenario_data.py | 3 +-- tests/test_scenarios.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/test_agents.py b/tests/test_agents.py index bf0143b..3e81237 100644 --- a/tests/test_agents.py +++ b/tests/test_agents.py @@ -97,5 +97,4 @@ class TestAgentRuns: @pytest.mark.asyncio async def test_unknown_run(self, agent_client): res = await agent_client.get(E.run("nonexistent")) - H.assert_status(res, 200) - assert "error" in res.json() + H.assert_status(res, 404) diff --git a/tests/test_scenario_data.py b/tests/test_scenario_data.py index de4db39..bdcf597 100644 --- a/tests/test_scenario_data.py +++ b/tests/test_scenario_data.py @@ -49,8 +49,7 @@ class TestFlights: @pytest.mark.asyncio async def test_patch_unknown_flight(self, client): res = await client.patch(E.flight("FAKE"), json={"delay_minutes": 10}) - H.assert_status(res, 200) - assert "error" in res.json() + H.assert_status(res, 404) class TestCrew: diff --git a/tests/test_scenarios.py b/tests/test_scenarios.py index bec9cd0..b78a9ad 100644 --- a/tests/test_scenarios.py +++ b/tests/test_scenarios.py @@ -49,5 +49,4 @@ class TestActiveScenario: @pytest.mark.asyncio async def test_switch_invalid(self, client): res = await client.put(E.SCENARIO_ACTIVE, json={"scenario_id": "nonexistent"}) - H.assert_status(res, 200) - assert "error" in res.json() + H.assert_status(res, 400)