diff --git a/tests/integration/test_host_mode_api_password.py b/tests/integration/test_host_mode_api_password.py index 098fc38142..825c2c55f2 100644 --- a/tests/integration/test_host_mode_api_password.py +++ b/tests/integration/test_host_mode_api_password.py @@ -41,7 +41,7 @@ async def test_host_mode_api_password( # Wait for at least one state with timeout try: await asyncio.wait_for(state_future, timeout=5.0) - except asyncio.TimeoutError: + except TimeoutError: pytest.fail("No states received within timeout") # Should have received at least one state (the test sensor) diff --git a/tests/integration/test_runtime_stats.py b/tests/integration/test_runtime_stats.py index cd8546facc..9e93035d83 100644 --- a/tests/integration/test_runtime_stats.py +++ b/tests/integration/test_runtime_stats.py @@ -65,13 +65,13 @@ async def test_runtime_stats( # Wait for first "Total stats" log (should happen at 1s) try: await asyncio.wait_for(first_stats_future, timeout=5.0) - except asyncio.TimeoutError: + except TimeoutError: pytest.fail("First 'Total stats' log not seen within 5 seconds") # Wait for second "Total stats" log (should happen at 2s) try: await asyncio.wait_for(second_stats_future, timeout=5.0) - except asyncio.TimeoutError: + except TimeoutError: pytest.fail(f"Second 'Total stats' log not seen. Total seen: {stats_count}") # Verify we got at least 2 stats logs