mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 01:38:02 +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")
|
||||
def port_fixture():
|
||||
def port_fixture() -> mock.MagicMock:
|
||||
"""Port fixture."""
|
||||
return mock.MagicMock()
|
||||
|
||||
|
||||
@pytest.fixture(name="sensor")
|
||||
def sensor_fixture(hass, port):
|
||||
def sensor_fixture(hass: HomeAssistant, port: mock.MagicMock) -> mfi.MfiSensor:
|
||||
"""Sensor fixture."""
|
||||
sensor = mfi.MfiSensor(port, hass)
|
||||
sensor.hass = hass
|
||||
|
Loading…
x
Reference in New Issue
Block a user