mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Use freezer.tick in devolo_home_network image tests (#101208)
Use freezer.tick
This commit is contained in:
parent
2d58ab0e1c
commit
598a8890e9
@ -68,8 +68,8 @@ async def test_guest_wifi_qr(
|
|||||||
|
|
||||||
# Emulate device failure
|
# Emulate device failure
|
||||||
mock_device.device.async_get_wifi_guest_access.side_effect = DeviceUnavailable()
|
mock_device.device.async_get_wifi_guest_access.side_effect = DeviceUnavailable()
|
||||||
freezer.move_to(dt_util.utcnow() + SHORT_UPDATE_INTERVAL)
|
freezer.tick(SHORT_UPDATE_INTERVAL)
|
||||||
async_fire_time_changed(hass, dt_util.utcnow() + SHORT_UPDATE_INTERVAL)
|
async_fire_time_changed(hass)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
state = hass.states.get(state_key)
|
state = hass.states.get(state_key)
|
||||||
@ -80,8 +80,8 @@ async def test_guest_wifi_qr(
|
|||||||
mock_device.device.async_get_wifi_guest_access = AsyncMock(
|
mock_device.device.async_get_wifi_guest_access = AsyncMock(
|
||||||
return_value=GUEST_WIFI_CHANGED
|
return_value=GUEST_WIFI_CHANGED
|
||||||
)
|
)
|
||||||
freezer.move_to(dt_util.utcnow() + SHORT_UPDATE_INTERVAL)
|
freezer.tick(SHORT_UPDATE_INTERVAL)
|
||||||
async_fire_time_changed(hass, dt_util.utcnow() + SHORT_UPDATE_INTERVAL)
|
async_fire_time_changed(hass)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
state = hass.states.get(state_key)
|
state = hass.states.get(state_key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user