Migrate homekit_controller tests to use freezegun (#105646)

This commit is contained in:
Jan-Philipp Benecke
2023-12-13 19:37:51 +01:00
committed by GitHub
parent 08ca3678da
commit d322cb5fdf
22 changed files with 152 additions and 197 deletions

View File

@@ -17,7 +17,7 @@ def create_camera(accessory):
async def test_migrate_unique_ids(
hass: HomeAssistant, entity_registry: er.EntityRegistry, utcnow
hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
"""Test migrating entity unique ids."""
aid = get_next_aid()
@@ -33,7 +33,7 @@ async def test_migrate_unique_ids(
)
async def test_read_state(hass: HomeAssistant, utcnow) -> None:
async def test_read_state(hass: HomeAssistant) -> None:
"""Test reading the state of a HomeKit camera."""
helper = await setup_test_component(hass, create_camera)
@@ -41,7 +41,7 @@ async def test_read_state(hass: HomeAssistant, utcnow) -> None:
assert state.state == "idle"
async def test_get_image(hass: HomeAssistant, utcnow) -> None:
async def test_get_image(hass: HomeAssistant) -> 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)