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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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