mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Improve type hints in mfi tests (#123792)
This commit is contained in:
parent
5f694d9a84
commit
2b968dfd9a
@ -116,13 +116,13 @@ async def test_setup_adds_proper_devices(hass: HomeAssistant) -> None:
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="port")
|
@pytest.fixture(name="port")
|
||||||
def port_fixture():
|
def port_fixture() -> mock.MagicMock:
|
||||||
"""Port fixture."""
|
"""Port fixture."""
|
||||||
return mock.MagicMock()
|
return mock.MagicMock()
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="sensor")
|
@pytest.fixture(name="sensor")
|
||||||
def sensor_fixture(hass, port):
|
def sensor_fixture(hass: HomeAssistant, port: mock.MagicMock) -> mfi.MfiSensor:
|
||||||
"""Sensor fixture."""
|
"""Sensor fixture."""
|
||||||
sensor = mfi.MfiSensor(port, hass)
|
sensor = mfi.MfiSensor(port, hass)
|
||||||
sensor.hass = hass
|
sensor.hass = hass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user