Fix Axis tests affecting other tests (#122857)

pull/122849/head^2
Erik Montnemery 2024-07-30 16:16:33 +02:00 committed by GitHub
parent c8372a3aa5
commit 224228e448
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -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,