mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +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
|
# Load the registries
|
||||||
if load_registries:
|
if load_registries:
|
||||||
|
with patch("homeassistant.helpers.storage.Store.async_load", return_value=None):
|
||||||
await asyncio.gather(
|
await asyncio.gather(
|
||||||
area_registry.async_load(hass),
|
area_registry.async_load(hass),
|
||||||
device_registry.async_load(hass),
|
device_registry.async_load(hass),
|
||||||
entity_registry.async_load(hass),
|
entity_registry.async_load(hass),
|
||||||
issue_registry.async_load(hass),
|
issue_registry.async_load(hass),
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
|
||||||
hass.data[bootstrap.DATA_REGISTRIES_LOADED] = None
|
hass.data[bootstrap.DATA_REGISTRIES_LOADED] = None
|
||||||
|
|
||||||
hass.state = CoreState.running
|
hass.state = CoreState.running
|
||||||
|
Loading…
x
Reference in New Issue
Block a user