Switch to asyncio.wait for slow update warning implementation (#41184)

This commit is contained in:
J. Nick Koston 2020-10-05 08:28:15 -05:00 committed by GitHub
parent dde465da48
commit f50976a0b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 62 additions and 45 deletions

View file

@ -140,6 +140,8 @@ async def _goto_future(hass, future=None):
with patch("homeassistant.util.utcnow", return_value=future):
async_fire_time_changed(hass, future)
await hass.async_block_till_done()
async_fire_time_changed(hass, future)
await hass.async_block_till_done()
async def test_full_valid_config(hass):
@ -247,6 +249,8 @@ async def test_delivered_not_shown(hass):
hass.components.persistent_notification = MagicMock()
await _setup_seventeentrack(hass, VALID_CONFIG_FULL_NO_DELIVERED)
await _goto_future(hass)
assert not hass.states.async_entity_ids()
hass.components.persistent_notification.create.assert_called()