mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 06:05:10 +02:00
Fix advantage_air disabled entity tests (#115548)
* Fix advantage_air disabled entity test * fix both
This commit is contained in:
@@ -76,8 +76,8 @@ async def test_binary_sensor_async_setup_entry(
|
||||
hass,
|
||||
dt_util.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_get.mock_calls) == 2
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert len(mock_get.mock_calls) == 1
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
assert state
|
||||
@@ -100,7 +100,7 @@ async def test_binary_sensor_async_setup_entry(
|
||||
hass,
|
||||
dt_util.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert len(mock_get.mock_calls) == 2
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
|
@@ -125,14 +125,14 @@ async def test_sensor_platform_disabled_entity(
|
||||
|
||||
mock_get.reset_mock()
|
||||
entity_registry.async_update_entity(entity_id=entity_id, disabled_by=None)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
async_fire_time_changed(
|
||||
hass,
|
||||
dt_util.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
assert len(mock_get.mock_calls) == 2
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert len(mock_get.mock_calls) == 1
|
||||
|
||||
state = hass.states.get(entity_id)
|
||||
assert state
|
||||
|
Reference in New Issue
Block a user