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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user