mirror of
https://github.com/home-assistant/core.git
synced 2026-10-06 22:38:02 -04:00
Skip the API call delay in Waze tests (#183316)
This commit is contained in:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user