From 224228e4480b4f71c5722ed6ac33221c5b1b4710 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 30 Jul 2024 16:16:33 +0200 Subject: [PATCH] Fix Axis tests affecting other tests (#122857) --- tests/components/axis/conftest.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/components/axis/conftest.py b/tests/components/axis/conftest.py index 30e1b7335b9..c3377c15955 100644 --- a/tests/components/axis/conftest.py +++ b/tests/components/axis/conftest.py @@ -128,6 +128,13 @@ def fixture_config_entry_options() -> MappingProxyType[str, Any]: # Axis API fixtures +@pytest.fixture(autouse=True) +def reset_mock_requests() -> Generator[None]: + """Reset respx mock routes after the test.""" + yield + respx.mock.clear() + + @pytest.fixture(name="mock_requests") def fixture_request( respx_mock: respx.MockRouter,