Use new setup_test_component_platform helper instead of test fixture for light platform (#114200)

This commit is contained in:
Jan-Philipp Benecke 2024-03-26 00:17:16 +01:00 committed by GitHub
parent 6bb4e7d62c
commit 9580adfde9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 96 additions and 173 deletions

View file

@ -9,7 +9,7 @@ import pytest
from homeassistant.const import STATE_OFF, STATE_ON
if TYPE_CHECKING:
from tests.components.light.common import MockLight, SetupLightPlatformCallable
from tests.components.light.common import MockLight
@pytest.fixture(scope="session", autouse=True)
@ -118,11 +118,3 @@ def mock_light_entities() -> list["MockLight"]:
MockLight("Ceiling", STATE_OFF),
MockLight(None, STATE_OFF),
]
@pytest.fixture
def setup_light_platform() -> "SetupLightPlatformCallable":
"""Return a callable to set up the mock light entity component."""
from tests.components.light.common import setup_light_platform
return setup_light_platform