Add MockToggleEntity type hints in tests (#120075)
This commit is contained in:
parent
fa1e4a225d
commit
904cf26d31
5 changed files with 27 additions and 24 deletions
|
@ -1,5 +1,6 @@
|
|||
"""The tests for the Light component."""
|
||||
|
||||
from typing import Literal
|
||||
from unittest.mock import MagicMock, mock_open, patch
|
||||
|
||||
import pytest
|
||||
|
@ -1144,7 +1145,7 @@ invalid_no_brightness_no_color_no_transition,,,
|
|||
|
||||
@pytest.mark.parametrize("light_state", [STATE_ON, STATE_OFF])
|
||||
async def test_light_backwards_compatibility_supported_color_modes(
|
||||
hass: HomeAssistant, light_state
|
||||
hass: HomeAssistant, light_state: Literal["on", "off"]
|
||||
) -> None:
|
||||
"""Test supported_color_modes if not implemented by the entity."""
|
||||
entities = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue