Add type hints to integration tests (part 9) (#87983)
This commit is contained in:
parent
6359775cfc
commit
03710e58b5
63 changed files with 1526 additions and 781 deletions
|
@ -2,6 +2,7 @@
|
|||
from aiohomekit.model.characteristics import CharacteristicsTypes
|
||||
from aiohomekit.model.services import ServicesTypes
|
||||
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
|
||||
from .common import get_next_aid, setup_test_component
|
||||
|
@ -27,7 +28,7 @@ def create_lock_service(accessory):
|
|||
return service
|
||||
|
||||
|
||||
async def test_switch_change_lock_state(hass, utcnow):
|
||||
async def test_switch_change_lock_state(hass: HomeAssistant, utcnow) -> None:
|
||||
"""Test that we can turn a HomeKit lock on and off again."""
|
||||
helper = await setup_test_component(hass, create_lock_service)
|
||||
|
||||
|
@ -52,7 +53,7 @@ async def test_switch_change_lock_state(hass, utcnow):
|
|||
)
|
||||
|
||||
|
||||
async def test_switch_read_lock_state(hass, utcnow):
|
||||
async def test_switch_read_lock_state(hass: HomeAssistant, utcnow) -> None:
|
||||
"""Test that we can read the state of a HomeKit lock accessory."""
|
||||
helper = await setup_test_component(hass, create_lock_service)
|
||||
|
||||
|
@ -116,7 +117,7 @@ async def test_switch_read_lock_state(hass, utcnow):
|
|||
assert state.state == "unlocking"
|
||||
|
||||
|
||||
async def test_migrate_unique_id(hass, utcnow):
|
||||
async def test_migrate_unique_id(hass: HomeAssistant, utcnow) -> None:
|
||||
"""Test a we can migrate a lock unique id."""
|
||||
entity_registry = er.async_get(hass)
|
||||
aid = get_next_aid()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue