mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Switch async_track_time_interval to use async_call_later internally (#99220)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""The tests for the Modbus cover component."""
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
from pymodbus.exceptions import ModbusException
|
||||
import pytest
|
||||
|
||||
@@ -142,14 +143,13 @@ async def test_coil_cover(hass: HomeAssistant, expected, mock_do_cycle) -> None:
|
||||
],
|
||||
)
|
||||
async def test_lazy_error_cover(
|
||||
hass: HomeAssistant, start_expect, end_expect, mock_do_cycle
|
||||
hass: HomeAssistant, start_expect, end_expect, mock_do_cycle: FrozenDateTimeFactory
|
||||
) -> None:
|
||||
"""Run test for given config."""
|
||||
now = mock_do_cycle
|
||||
assert hass.states.get(ENTITY_ID).state == start_expect
|
||||
now = await do_next_cycle(hass, now, 11)
|
||||
await do_next_cycle(hass, mock_do_cycle, 11)
|
||||
assert hass.states.get(ENTITY_ID).state == start_expect
|
||||
now = await do_next_cycle(hass, now, 11)
|
||||
await do_next_cycle(hass, mock_do_cycle, 11)
|
||||
assert hass.states.get(ENTITY_ID).state == end_expect
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user