mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Improve type hints in mochad tests (#123794)
This commit is contained in:
parent
992de497f2
commit
5f694d9a84
@ -18,7 +18,7 @@ def pymochad_mock():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def light_mock(hass, brightness):
|
def light_mock(hass: HomeAssistant, brightness: int) -> mochad.MochadLight:
|
||||||
"""Mock light."""
|
"""Mock light."""
|
||||||
controller_mock = mock.MagicMock()
|
controller_mock = mock.MagicMock()
|
||||||
dev_dict = {"address": "a1", "name": "fake_light", "brightness_levels": brightness}
|
dev_dict = {"address": "a1", "name": "fake_light", "brightness_levels": brightness}
|
||||||
|
@ -21,7 +21,7 @@ def pymochad_mock():
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def switch_mock(hass):
|
def switch_mock(hass: HomeAssistant) -> mochad.MochadSwitch:
|
||||||
"""Mock switch."""
|
"""Mock switch."""
|
||||||
controller_mock = mock.MagicMock()
|
controller_mock = mock.MagicMock()
|
||||||
dev_dict = {"address": "a1", "name": "fake_switch"}
|
dev_dict = {"address": "a1", "name": "fake_switch"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user