Add type hints to integration tests (part 11) (#87996)

This commit is contained in:
epenet 2023-02-13 14:22:49 +01:00 committed by GitHub
parent 8f2a764a43
commit 1e352b60df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
48 changed files with 610 additions and 307 deletions

View file

@ -1,4 +1,6 @@
"""Basic checks for entity map storage."""
from typing import Any
from aiohomekit.model.characteristics import CharacteristicsTypes
from aiohomekit.model.services import ServicesTypes
@ -11,7 +13,9 @@ from .common import setup_platform, setup_test_component
from tests.common import flush_store
async def test_load_from_storage(hass: HomeAssistant, hass_storage) -> None:
async def test_load_from_storage(
hass: HomeAssistant, hass_storage: dict[str, Any]
) -> None:
"""Test that entity map can be correctly loaded from cache."""
hkid = "00:00:00:00:00:00"
@ -24,7 +28,9 @@ async def test_load_from_storage(hass: HomeAssistant, hass_storage) -> None:
assert hkid in hass.data[ENTITY_MAP].storage_data
async def test_storage_is_removed(hass: HomeAssistant, hass_storage) -> None:
async def test_storage_is_removed(
hass: HomeAssistant, hass_storage: dict[str, Any]
) -> None:
"""Test entity map storage removal is idempotent."""
await setup_platform(hass)
@ -65,7 +71,7 @@ def create_lightbulb_service(accessory):
async def test_storage_is_updated_on_add(
hass: HomeAssistant, hass_storage, utcnow
hass: HomeAssistant, hass_storage: dict[str, Any], utcnow
) -> None:
"""Test entity map storage is cleaned up on adding an accessory."""
await setup_test_component(hass, create_lightbulb_service)