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 (b-c) (#87698)

This commit is contained in:
epenet
2023-02-08 18:08:43 +01:00
committed by GitHub
parent 1a414f1433
commit 807c69f621
66 changed files with 548 additions and 350 deletions

View File

@@ -14,12 +14,13 @@ from homeassistant.components.alexa import errors as alexa_errors
from homeassistant.components.alexa.entities import LightCapabilities
from homeassistant.components.cloud.const import DOMAIN
from homeassistant.components.google_assistant.helpers import GoogleEntity
from homeassistant.core import State
from homeassistant.core import HomeAssistant, State
from homeassistant.util.location import LocationInfo
from . import mock_cloud, mock_cloud_prefs
from tests.components.google_assistant import MockConfig
from tests.typing import WebSocketGenerator
SUBSCRIPTION_INFO_URL = "https://api-test.hass.io/payments/subscription_info"
@@ -427,7 +428,9 @@ async def test_websocket_status(
}
async def test_websocket_status_not_logged_in(hass, hass_ws_client):
async def test_websocket_status_not_logged_in(
hass: HomeAssistant, hass_ws_client: WebSocketGenerator
) -> None:
"""Test querying the status."""
client = await hass_ws_client(hass)
await client.send_json({"id": 5, "type": "cloud/status"})
@@ -466,7 +469,9 @@ async def test_websocket_subscription_fail(
assert response["error"]["code"] == "request_failed"
async def test_websocket_subscription_not_logged_in(hass, hass_ws_client):
async def test_websocket_subscription_not_logged_in(
hass: HomeAssistant, hass_ws_client: WebSocketGenerator
) -> None:
"""Test querying the status."""
client = await hass_ws_client(hass)
with patch(