Improve type hints in owntracks tests (#123905)

This commit is contained in:
epenet
2024-08-14 15:08:10 +02:00
committed by GitHub
parent fa8f86b672
commit 3e5d0eb632

View File

@@ -1,7 +1,7 @@
"""The tests for the Owntracks device tracker.""" """The tests for the Owntracks device tracker."""
import base64 import base64
from collections.abc import Callable from collections.abc import Callable, Generator
import json import json
import pickle import pickle
from unittest.mock import patch from unittest.mock import patch
@@ -294,7 +294,7 @@ def setup_comp(
hass: HomeAssistant, hass: HomeAssistant,
mock_device_tracker_conf: list[Device], mock_device_tracker_conf: list[Device],
mqtt_mock: MqttMockHAClient, mqtt_mock: MqttMockHAClient,
): ) -> None:
"""Initialize components.""" """Initialize components."""
hass.loop.run_until_complete(async_setup_component(hass, "device_tracker", {})) hass.loop.run_until_complete(async_setup_component(hass, "device_tracker", {}))
@@ -1426,7 +1426,7 @@ def mock_cipher():
@pytest.fixture @pytest.fixture
def config_context(hass, setup_comp): def config_context(setup_comp: None) -> Generator[None]:
"""Set up the mocked context.""" """Set up the mocked context."""
patch_load = patch( patch_load = patch(
"homeassistant.components.device_tracker.async_load_config", "homeassistant.components.device_tracker.async_load_config",