mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Fix tests
This commit is contained in:
@@ -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: {}})
|
res = yield from async_setup_component(hass, updater.DOMAIN, {updater.DOMAIN: {}})
|
||||||
assert res, "Updater failed to set up"
|
assert res, "Updater failed to set up"
|
||||||
|
|
||||||
|
yield from hass.async_block_till_done()
|
||||||
|
|
||||||
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
||||||
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
||||||
yield from hass.async_block_till_done()
|
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: {}})
|
res = yield from async_setup_component(hass, updater.DOMAIN, {updater.DOMAIN: {}})
|
||||||
assert res, "Updater failed to set up"
|
assert res, "Updater failed to set up"
|
||||||
|
|
||||||
|
yield from hass.async_block_till_done()
|
||||||
|
|
||||||
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
||||||
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
||||||
yield from hass.async_block_till_done()
|
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"
|
assert res, "Updater failed to set up"
|
||||||
|
|
||||||
|
yield from hass.async_block_till_done()
|
||||||
|
|
||||||
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
||||||
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
||||||
yield from hass.async_block_till_done()
|
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: {}})
|
res = yield from async_setup_component(hass, updater.DOMAIN, {updater.DOMAIN: {}})
|
||||||
assert res, "Updater failed to set up"
|
assert res, "Updater failed to set up"
|
||||||
|
|
||||||
|
yield from hass.async_block_till_done()
|
||||||
|
|
||||||
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
with patch("homeassistant.components.updater.current_version", MOCK_VERSION):
|
||||||
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
async_fire_time_changed(hass, dt_util.utcnow() + timedelta(hours=1))
|
||||||
yield from hass.async_block_till_done()
|
yield from hass.async_block_till_done()
|
||||||
|
Reference in New Issue
Block a user