Fix lingering timer in collection helper tests (#89793)

* Fix lingering timer in collection helper tests

* One more
This commit is contained in:
epenet 2023-03-16 13:38:22 +01:00 committed by GitHub
parent b3bd80d905
commit c6568ffb62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -256,6 +256,7 @@ async def test_storage_collection(hass: HomeAssistant) -> None:
async def test_attach_entity_component_collection(hass: HomeAssistant) -> None:
"""Test attaching collection to entity component."""
ent_comp = entity_component.EntityComponent(_LOGGER, "test", hass)
await ent_comp.async_setup({})
coll = MockObservableCollection(_LOGGER)
collection.sync_entity_lifecycle(hass, "test", "test", ent_comp, coll, MockEntity)
@ -295,6 +296,7 @@ async def test_attach_entity_component_collection(hass: HomeAssistant) -> None:
async def test_entity_component_collection_abort(hass: HomeAssistant) -> None:
"""Test aborted entity adding is handled."""
ent_comp = entity_component.EntityComponent(_LOGGER, "test", hass)
await ent_comp.async_setup({})
coll = MockObservableCollection(_LOGGER)
async_update_config_calls = []
@ -361,6 +363,7 @@ async def test_entity_component_collection_abort(hass: HomeAssistant) -> None:
async def test_entity_component_collection_entity_removed(hass: HomeAssistant) -> None:
"""Test entity removal is handled."""
ent_comp = entity_component.EntityComponent(_LOGGER, "test", hass)
await ent_comp.async_setup({})
coll = MockObservableCollection(_LOGGER)
async_update_config_calls = []