mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Ensure entity platform in light tests (#135787)
This commit is contained in:
parent
619917c679
commit
88c3be4ecf
@ -2626,7 +2626,9 @@ def test_filter_supported_color_modes() -> None:
|
||||
assert light.filter_supported_color_modes(supported) == {light.ColorMode.BRIGHTNESS}
|
||||
|
||||
|
||||
def test_deprecated_supported_features_ints(caplog: pytest.LogCaptureFixture) -> None:
|
||||
def test_deprecated_supported_features_ints(
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Test deprecated supported features ints."""
|
||||
|
||||
class MockLightEntityEntity(light.LightEntity):
|
||||
@ -2636,6 +2638,8 @@ def test_deprecated_supported_features_ints(caplog: pytest.LogCaptureFixture) ->
|
||||
return 1
|
||||
|
||||
entity = MockLightEntityEntity()
|
||||
entity.hass = hass
|
||||
entity.platform = MockEntityPlatform(hass, domain="test", platform_name="test")
|
||||
assert entity.supported_features_compat is light.LightEntityFeature(1)
|
||||
assert "MockLightEntityEntity" in caplog.text
|
||||
assert "is using deprecated supported features values" in caplog.text
|
||||
|
Loading…
x
Reference in New Issue
Block a user