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

Improve hass_ws_client type hint in tests (#89703)

This commit is contained in:
epenet
2023-03-14 16:31:40 +01:00
committed by GitHub
parent 1bc4802c04
commit 71dc98a39c
17 changed files with 52 additions and 71 deletions

View File

@@ -1,18 +1,18 @@
"""Tests for the Backup integration."""
from collections.abc import Awaitable, Callable
from unittest.mock import patch
from aiohttp import ClientWebSocketResponse
import pytest
from homeassistant.core import HomeAssistant
from .common import TEST_BACKUP, setup_backup_integration
from tests.typing import WebSocketGenerator
async def test_info(
hass: HomeAssistant,
hass_ws_client: Callable[[HomeAssistant], Awaitable[ClientWebSocketResponse]],
hass_ws_client: WebSocketGenerator,
) -> None:
"""Test getting backup info."""
await setup_backup_integration(hass)
@@ -34,7 +34,7 @@ async def test_info(
async def test_remove(
hass: HomeAssistant,
hass_ws_client: Callable[[HomeAssistant], Awaitable[ClientWebSocketResponse]],
hass_ws_client: WebSocketGenerator,
caplog: pytest.LogCaptureFixture,
) -> None:
"""Test removing a backup file."""
@@ -55,7 +55,7 @@ async def test_remove(
async def test_generate(
hass: HomeAssistant,
hass_ws_client: Callable[[HomeAssistant], Awaitable[ClientWebSocketResponse]],
hass_ws_client: WebSocketGenerator,
) -> None:
"""Test removing a backup file."""
await setup_backup_integration(hass)