1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use loop.time in DataUpdateCoordinator (#98937)

This commit is contained in:
Erik Montnemery
2023-08-28 17:16:34 +02:00
committed by GitHub
parent d4e72c49fa
commit 9dac6a2948
6 changed files with 71 additions and 32 deletions

View File

@@ -4174,27 +4174,27 @@ async def test_periodic_task_entering_dst_2(
)
freezer.move_to(f"{today} 01:59:59.999999+01:00")
async_fire_time_changed(hass)
async_fire_time_changed_exact(hass)
await hass.async_block_till_done()
assert len(specific_runs) == 0
freezer.move_to(f"{today} 03:00:00.999999+02:00")
async_fire_time_changed(hass)
async_fire_time_changed_exact(hass)
await hass.async_block_till_done()
assert len(specific_runs) == 1
freezer.move_to(f"{today} 03:00:01.999999+02:00")
async_fire_time_changed(hass)
async_fire_time_changed_exact(hass)
await hass.async_block_till_done()
assert len(specific_runs) == 2
freezer.move_to(f"{tomorrow} 01:59:59.999999+02:00")
async_fire_time_changed(hass)
async_fire_time_changed_exact(hass)
await hass.async_block_till_done()
assert len(specific_runs) == 3
freezer.move_to(f"{tomorrow} 02:00:00.999999+02:00")
async_fire_time_changed(hass)
async_fire_time_changed_exact(hass)
await hass.async_block_till_done()
assert len(specific_runs) == 4