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 (m-p) (#87705)

This commit is contained in:
epenet
2023-02-08 16:48:54 +01:00
committed by GitHub
parent 6551eb168d
commit 3abf7ea18a
99 changed files with 637 additions and 438 deletions

View File

@@ -3,9 +3,10 @@ from unittest.mock import Mock, patch
from homeassistant import setup
from homeassistant.components import frontend
from homeassistant.core import HomeAssistant
async def test_webcomponent_custom_path_not_found(hass):
async def test_webcomponent_custom_path_not_found(hass: HomeAssistant) -> None:
"""Test if a web component is found in config panels dir."""
filename = "mock.file"
@@ -30,7 +31,7 @@ async def test_webcomponent_custom_path_not_found(hass):
assert "nice_url" not in panels
async def test_js_webcomponent(hass):
async def test_js_webcomponent(hass: HomeAssistant) -> None:
"""Test if a web component is found in config panels dir."""
config = {
"panel_custom": {
@@ -69,7 +70,7 @@ async def test_js_webcomponent(hass):
assert panel.sidebar_title == "Sidebar Title"
async def test_module_webcomponent(hass):
async def test_module_webcomponent(hass: HomeAssistant) -> None:
"""Test if a js module is found in config panels dir."""
config = {
"panel_custom": {
@@ -110,7 +111,7 @@ async def test_module_webcomponent(hass):
assert panel.sidebar_title == "Sidebar Title"
async def test_latest_and_es5_build(hass):
async def test_latest_and_es5_build(hass: HomeAssistant) -> None:
"""Test specifying an es5 and latest build."""
config = {
"panel_custom": {
@@ -142,7 +143,7 @@ async def test_latest_and_es5_build(hass):
assert panel.frontend_url_path == "nice_url"
async def test_url_path_conflict(hass):
async def test_url_path_conflict(hass: HomeAssistant) -> None:
"""Test config with overlapping url path."""
assert await setup.async_setup_component(
hass,