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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 152 additions and 197 deletions

View file

@ -64,9 +64,7 @@ def create_doorbell(accessory):
battery.add_char(CharacteristicsTypes.BATTERY_LEVEL)
async def test_remote(
hass: HomeAssistant, entity_registry: er.EntityRegistry, utcnow
) -> None:
async def test_remote(hass: HomeAssistant, entity_registry: er.EntityRegistry) -> None:
"""Test that remote is supported."""
helper = await setup_test_component(hass, create_remote)
@ -109,9 +107,7 @@ async def test_remote(
assert state.attributes["event_type"] == "long_press"
async def test_button(
hass: HomeAssistant, entity_registry: er.EntityRegistry, utcnow
) -> None:
async def test_button(hass: HomeAssistant, entity_registry: er.EntityRegistry) -> None:
"""Test that a button is correctly enumerated."""
helper = await setup_test_component(hass, create_button)
entity_id = "event.testdevice_button_1"
@ -148,7 +144,7 @@ async def test_button(
async def test_doorbell(
hass: HomeAssistant, entity_registry: er.EntityRegistry, utcnow
hass: HomeAssistant, entity_registry: er.EntityRegistry
) -> None:
"""Test that doorbell service is handled."""
helper = await setup_test_component(hass, create_doorbell)