mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 13:00:11 +00:00
Add type hints to integration tests (part 9) (#87983)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user