Fix advantage_air disabled entity tests (#115548)

* Fix advantage_air disabled entity test

* fix both
This commit is contained in:
J. Nick Koston 2024-04-13 17:13:19 -05:00 committed by GitHub
parent 0b3627b59e
commit 4955364948
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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