Add MockToggleEntity type hints in tests (#120075)

This commit is contained in:
epenet 2024-06-21 12:32:03 +02:00 committed by GitHub
parent fa1e4a225d
commit 904cf26d31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 24 deletions

View file

@ -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 = [