Add type hints to integration tests (part 9) (#87983)

This commit is contained in:
epenet
2023-02-13 12:06:51 +01:00
committed by GitHub
parent 6359775cfc
commit 03710e58b5
63 changed files with 1526 additions and 781 deletions

View File

@@ -5,6 +5,7 @@ from aiohomekit.model.services import ServicesTypes
from aiohomekit.testing import FAKE_CAMERA_IMAGE
from homeassistant.components import camera
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er
from .common import get_next_aid, setup_test_component
@@ -15,7 +16,7 @@ def create_camera(accessory):
accessory.add_service(ServicesTypes.CAMERA_RTP_STREAM_MANAGEMENT)
async def test_migrate_unique_ids(hass, utcnow):
async def test_migrate_unique_ids(hass: HomeAssistant, utcnow) -> None:
"""Test migrating entity unique ids."""
entity_registry = er.async_get(hass)
aid = get_next_aid()
@@ -31,7 +32,7 @@ async def test_migrate_unique_ids(hass, utcnow):
)
async def test_read_state(hass, utcnow):
async def test_read_state(hass: HomeAssistant, utcnow) -> None:
"""Test reading the state of a HomeKit camera."""
helper = await setup_test_component(hass, create_camera)
@@ -39,7 +40,7 @@ async def test_read_state(hass, utcnow):
assert state.state == "idle"
async def test_get_image(hass, utcnow):
async def test_get_image(hass: HomeAssistant, utcnow) -> None:
"""Test getting a JPEG from a camera."""
helper = await setup_test_component(hass, create_camera)
image = await camera.async_get_image(hass, helper.entity_id)