mirror of
https://github.com/home-assistant/core
synced 2024-10-05 15:17:19 +00:00
Stub I/O when loading registries in tests (#87744)
This commit is contained in:
parent
769e0356ad
commit
f9dc562251
|
@ -310,13 +310,13 @@ async def async_test_home_assistant(event_loop, load_registries=True):
|
|||
|
||||
# Load the registries
|
||||
if load_registries:
|
||||
await asyncio.gather(
|
||||
area_registry.async_load(hass),
|
||||
device_registry.async_load(hass),
|
||||
entity_registry.async_load(hass),
|
||||
issue_registry.async_load(hass),
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
with patch("homeassistant.helpers.storage.Store.async_load", return_value=None):
|
||||
await asyncio.gather(
|
||||
area_registry.async_load(hass),
|
||||
device_registry.async_load(hass),
|
||||
entity_registry.async_load(hass),
|
||||
issue_registry.async_load(hass),
|
||||
)
|
||||
hass.data[bootstrap.DATA_REGISTRIES_LOADED] = None
|
||||
|
||||
hass.state = CoreState.running
|
||||
|
|
Loading…
Reference in a new issue