Remove deprecated hass.components from scene tests (#114014)

This commit is contained in:
Jan-Philipp Benecke 2024-03-22 17:48:53 +01:00 committed by GitHub
parent 08529b3806
commit edc19328c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,14 +19,19 @@ from homeassistant.util import dt as dt_util
from homeassistant.util.yaml import loader as yaml_loader from homeassistant.util.yaml import loader as yaml_loader
from tests.common import async_mock_service, mock_restore_cache from tests.common import async_mock_service, mock_restore_cache
from tests.components.light.common import MockLight, SetupLightPlatformCallable
@pytest.fixture(autouse=True) @pytest.fixture(autouse=True)
def entities(hass): def entities(
hass: HomeAssistant,
setup_light_platform: SetupLightPlatformCallable,
mock_light_entities: list[MockLight],
) -> list[MockLight]:
"""Initialize the test light.""" """Initialize the test light."""
platform = getattr(hass.components, "test.light") entities = mock_light_entities[0:2]
platform.init() setup_light_platform(hass, entities)
return platform.ENTITIES[0:2] return entities
async def test_config_yaml_alias_anchor( async def test_config_yaml_alias_anchor(