mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +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
|
||||
def light_mock(hass, brightness):
|
||||
def light_mock(hass: HomeAssistant, brightness: int) -> mochad.MochadLight:
|
||||
"""Mock light."""
|
||||
controller_mock = mock.MagicMock()
|
||||
dev_dict = {"address": "a1", "name": "fake_light", "brightness_levels": brightness}
|
||||
|
@ -21,7 +21,7 @@ def pymochad_mock():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def switch_mock(hass):
|
||||
def switch_mock(hass: HomeAssistant) -> mochad.MochadSwitch:
|
||||
"""Mock switch."""
|
||||
controller_mock = mock.MagicMock()
|
||||
dev_dict = {"address": "a1", "name": "fake_switch"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user