mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Fix advantage_air disabled entity tests (#115548)
* Fix advantage_air disabled entity test * fix both
This commit is contained in:
parent
0b3627b59e
commit
4955364948
@ -76,8 +76,8 @@ async def test_binary_sensor_async_setup_entry(
|
|||||||
hass,
|
hass,
|
||||||
dt_util.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
|
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
|
assert len(mock_get.mock_calls) == 1
|
||||||
|
|
||||||
state = hass.states.get(entity_id)
|
state = hass.states.get(entity_id)
|
||||||
assert state
|
assert state
|
||||||
@ -100,7 +100,7 @@ async def test_binary_sensor_async_setup_entry(
|
|||||||
hass,
|
hass,
|
||||||
dt_util.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
|
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
|
assert len(mock_get.mock_calls) == 2
|
||||||
|
|
||||||
state = hass.states.get(entity_id)
|
state = hass.states.get(entity_id)
|
||||||
|
@ -125,14 +125,14 @@ async def test_sensor_platform_disabled_entity(
|
|||||||
|
|
||||||
mock_get.reset_mock()
|
mock_get.reset_mock()
|
||||||
entity_registry.async_update_entity(entity_id=entity_id, disabled_by=None)
|
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(
|
async_fire_time_changed(
|
||||||
hass,
|
hass,
|
||||||
dt_util.utcnow() + timedelta(seconds=RELOAD_AFTER_UPDATE_DELAY + 1),
|
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
|
assert len(mock_get.mock_calls) == 1
|
||||||
|
|
||||||
state = hass.states.get(entity_id)
|
state = hass.states.get(entity_id)
|
||||||
assert state
|
assert state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user