mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Remove deprecated hass.components
from scene tests (#114014)
This commit is contained in:
parent
08529b3806
commit
edc19328c0
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user