Skip the API call delay in Waze tests (#183316)

This commit is contained in:
Erwin Douna
2026-09-27 17:17:48 +02:00
committed by GitHub
parent 742e1b6f07
commit 35c7b8ece8
@@ -1,5 +1,6 @@
"""Fixtures for Waze Travel Time tests."""
from collections.abc import Generator
from unittest.mock import patch
import pytest
@@ -12,6 +13,16 @@ from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
@pytest.fixture(autouse=True)
def no_api_call_delay() -> Generator[None]:
"""Skip the delay between Waze API calls."""
with patch(
"homeassistant.components.waze_travel_time.coordinator.SECONDS_BETWEEN_API_CALLS",
0,
):
yield
@pytest.fixture(name="mock_config")
async def mock_config_fixture(hass: HomeAssistant, data, options):
"""Mock a Waze Travel Time config entry."""