1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add type hints to integration tests (a) (#87684)

* Add type hints to accuweather tests

* Adjust a** components

* Adjust aiohttp_client

* ClientSessionGenerator/WebSocketGenerator
This commit is contained in:
epenet
2023-02-08 12:16:23 +01:00
committed by GitHub
parent 7665c89b83
commit 2545694d41
79 changed files with 720 additions and 425 deletions

View File

@@ -5,6 +5,7 @@ import aprslib
import pytest
import homeassistant.components.aprs.device_tracker as device_tracker
from homeassistant.core import HomeAssistant
DEFAULT_PORT = 14580
@@ -297,7 +298,7 @@ def test_aprs_listener_rx_msg_no_position() -> None:
see.assert_not_called()
async def test_setup_scanner(hass):
async def test_setup_scanner(hass: HomeAssistant) -> None:
"""Test setup_scanner."""
with patch(
"homeassistant.components.aprs.device_tracker.AprsListenerThread"
@@ -321,7 +322,7 @@ async def test_setup_scanner(hass):
)
async def test_setup_scanner_timeout(hass):
async def test_setup_scanner_timeout(hass: HomeAssistant) -> None:
"""Test setup_scanner failure from timeout."""
with patch("aprslib.IS.connect", side_effect=TimeoutError):
config = {