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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 52 additions and 71 deletions

View file

@ -1,11 +1,9 @@
"""The tests for the automation component."""
import asyncio
from collections.abc import Awaitable, Callable
from datetime import timedelta
import logging
from unittest.mock import Mock, patch
from aiohttp import ClientWebSocketResponse
import pytest
import homeassistant.components.automation as automation
@ -1437,7 +1435,7 @@ async def test_automation_bad_config_validation(
async def test_automation_with_error_in_script(
hass: HomeAssistant,
caplog: pytest.LogCaptureFixture,
hass_ws_client: Callable[[HomeAssistant], Awaitable[ClientWebSocketResponse]],
hass_ws_client: WebSocketGenerator,
) -> None:
"""Test automation with an error in script."""
assert await async_setup_component(