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

Adjust hass_client type hint in integration tests (#86954)

* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
This commit is contained in:
epenet
2023-02-02 22:29:57 +01:00
committed by GitHub
parent 8bff95014c
commit a79be493e5
54 changed files with 179 additions and 178 deletions

View File

@@ -1,11 +1,9 @@
"""Test cloud repairs."""
from collections.abc import Awaitable, Callable, Generator
from collections.abc import Generator
from datetime import timedelta
from http import HTTPStatus
from unittest.mock import AsyncMock, patch
from aiohttp import ClientSession
from homeassistant.components.cloud import DOMAIN
import homeassistant.components.cloud.repairs as cloud_repairs
from homeassistant.components.repairs import DOMAIN as REPAIRS_DOMAIN
@@ -18,6 +16,7 @@ from . import mock_cloud
from tests.common import async_fire_time_changed
from tests.test_util.aiohttp import AiohttpClientMocker
from tests.typing import ClientSessionGenerator
async def test_do_not_create_repair_issues_at_startup_if_not_logged_in(
@@ -80,7 +79,7 @@ async def test_legacy_subscription_repair_flow(
hass: HomeAssistant,
aioclient_mock: AiohttpClientMocker,
mock_auth: Generator[None, AsyncMock, None],
hass_client: Callable[..., Awaitable[ClientSession]],
hass_client: ClientSessionGenerator,
):
"""Test desired flow of the fix flow for legacy subscription."""
issue_registry: ir.IssueRegistry = ir.async_get(hass)
@@ -163,7 +162,7 @@ async def test_legacy_subscription_repair_flow(
async def test_legacy_subscription_repair_flow_timeout(
hass: HomeAssistant,
hass_client: Callable[..., Awaitable[ClientSession]],
hass_client: ClientSessionGenerator,
mock_auth: Generator[None, AsyncMock, None],
aioclient_mock: AiohttpClientMocker,
):