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

@@ -28,7 +28,7 @@ def create_lock_service(accessory):
return service
async def test_switch_change_lock_state(hass: HomeAssistant, utcnow) -> None:
async def test_switch_change_lock_state(hass: HomeAssistant) -> None:
"""Test that we can turn a HomeKit lock on and off again."""
helper = await setup_test_component(hass, create_lock_service)
@@ -53,7 +53,7 @@ async def test_switch_change_lock_state(hass: HomeAssistant, utcnow) -> None:
)
async def test_switch_read_lock_state(hass: HomeAssistant, utcnow) -> None:
async def test_switch_read_lock_state(hass: HomeAssistant) -> None:
"""Test that we can read the state of a HomeKit lock accessory."""
helper = await setup_test_component(hass, create_lock_service)
@@ -118,7 +118,7 @@ async def test_switch_read_lock_state(hass: HomeAssistant, utcnow) -> None:
async def test_migrate_unique_id(
hass: HomeAssistant, entity_registry: er.EntityRegistry, utcnow
hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
"""Test a we can migrate a lock unique id."""
aid = get_next_aid()