Add type hints to integration tests (j-m) (#87704)
This commit is contained in:
parent
630028106a
commit
f75ac17554
103 changed files with 605 additions and 417 deletions
|
@ -4,15 +4,20 @@ from unittest.mock import patch
|
|||
import uuid
|
||||
|
||||
from homeassistant.components.lovelace import dashboard, resources
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from tests.typing import WebSocketGenerator
|
||||
|
||||
RESOURCE_EXAMPLES = [
|
||||
{"type": "js", "url": "/local/bla.js"},
|
||||
{"type": "css", "url": "/local/bla.css"},
|
||||
]
|
||||
|
||||
|
||||
async def test_yaml_resources(hass, hass_ws_client):
|
||||
async def test_yaml_resources(
|
||||
hass: HomeAssistant, hass_ws_client: WebSocketGenerator
|
||||
) -> None:
|
||||
"""Test defining resources in configuration.yaml."""
|
||||
assert await async_setup_component(
|
||||
hass, "lovelace", {"lovelace": {"mode": "yaml", "resources": RESOURCE_EXAMPLES}}
|
||||
|
@ -27,7 +32,9 @@ async def test_yaml_resources(hass, hass_ws_client):
|
|||
assert response["result"] == RESOURCE_EXAMPLES
|
||||
|
||||
|
||||
async def test_yaml_resources_backwards(hass, hass_ws_client):
|
||||
async def test_yaml_resources_backwards(
|
||||
hass: HomeAssistant, hass_ws_client: WebSocketGenerator
|
||||
) -> None:
|
||||
"""Test defining resources in YAML ll config (legacy)."""
|
||||
with patch(
|
||||
"homeassistant.components.lovelace.dashboard.load_yaml",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue