Wait for registries to load at startup (#46265)

* Wait for registries to load at startup

* Don't decorate new functions with @bind_hass

* Fix typing errors in zwave_js

* Load registries in async_test_home_assistant

* Tweak

* Typo

* Tweak

* Explicitly silence mypy errors

* Fix tests

* Fix more tests

* Fix test

* Improve docstring

* Wait for registries to load
This commit is contained in:
Erik Montnemery 2021-02-11 17:36:19 +01:00 committed by GitHub
parent 888c9e120d
commit ed31cc363b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 131 additions and 107 deletions

View file

@ -3,6 +3,8 @@ from asyncio import Event
from datetime import timedelta
from unittest.mock import patch
import pytest
from homeassistant.bootstrap import async_from_config_dict
from homeassistant.components import sensor
from homeassistant.const import (
@ -403,6 +405,7 @@ async def test_setup_valid_device_class(hass):
assert "device_class" not in state.attributes
@pytest.mark.parametrize("load_registries", [False])
async def test_creating_sensor_loads_group(hass):
"""Test setting up template sensor loads group component first."""
order = []