From cc927da50253dba87f86e4dcc981036025a7d00a Mon Sep 17 00:00:00 2001 From: Tobias Haase Date: Fri, 2 Aug 2019 00:56:43 +0200 Subject: [PATCH] Fix tests --- tests/components/updater/test_init.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/components/updater/test_init.py b/tests/components/updater/test_init.py index bda5aa2f7c7..2569bde2d94 100644 --- a/tests/components/updater/test_init.py +++ b/tests/components/updater/test_init.py @@ -53,6 +53,8 @@ def test_new_version_shows_entity_true(hass, mock_get_uuid, mock_get_newest_vers res = yield from async_setup_component(hass, updater.DOMAIN, {updater.DOMAIN: {}}) assert res, "Updater failed to set up" + yield from hass.async_block_till_done() + with patch("homeassistant.components.updater.current_version", MOCK_VERSION): async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1)) yield from hass.async_block_till_done() @@ -73,6 +75,8 @@ def test_same_version_shows_entity_false(hass, mock_get_uuid, mock_get_newest_ve res = yield from async_setup_component(hass, updater.DOMAIN, {updater.DOMAIN: {}}) assert res, "Updater failed to set up" + yield from hass.async_block_till_done() + with patch("homeassistant.components.updater.current_version", MOCK_VERSION): async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1)) yield from hass.async_block_till_done() @@ -95,6 +99,8 @@ def test_disable_reporting(hass, mock_get_uuid, mock_get_newest_version): ) assert res, "Updater failed to set up" + yield from hass.async_block_till_done() + with patch("homeassistant.components.updater.current_version", MOCK_VERSION): async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1)) yield from hass.async_block_till_done() @@ -187,6 +193,8 @@ def test_new_version_shows_entity_after_hour_hassio( res = yield from async_setup_component(hass, updater.DOMAIN, {updater.DOMAIN: {}}) assert res, "Updater failed to set up" + yield from hass.async_block_till_done() + with patch("homeassistant.components.updater.current_version", MOCK_VERSION): async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1)) yield from hass.async_block_till_done()