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 (part 14) (#88005)

This commit is contained in:
epenet
2023-02-15 10:31:43 +01:00
committed by GitHub
parent a0e0feb444
commit 6c430e03bc
51 changed files with 630 additions and 331 deletions

View File

@@ -1,5 +1,6 @@
"""Tests for the mobile app integration."""
from homeassistant.components.mobile_app.const import DATA_DELETED_IDS, DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er
from .const import CALL_SERVICE
@@ -7,7 +8,9 @@ from .const import CALL_SERVICE
from tests.common import async_mock_service
async def test_unload_unloads(hass, create_registrations, webhook_client):
async def test_unload_unloads(
hass: HomeAssistant, create_registrations, webhook_client
) -> None:
"""Test we clean up when we unload."""
# Second config entry is the one without encryption
config_entry = hass.config_entries.async_entries("mobile_app")[1]
@@ -25,7 +28,7 @@ async def test_unload_unloads(hass, create_registrations, webhook_client):
assert len(calls) == 1
async def test_remove_entry(hass, create_registrations):
async def test_remove_entry(hass: HomeAssistant, create_registrations) -> None:
"""Test we clean up when we remove entry."""
for config_entry in hass.config_entries.async_entries("mobile_app"):
await hass.config_entries.async_remove(config_entry.entry_id)