mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 10:29:27 +00:00
Update h* tests to use entity & device registry fixtures (#103866)
* Update h* tests to use entity & device registry fixtures * Add missed lines
This commit is contained in:
committed by
GitHub
parent
3a531f5698
commit
eda475fe25
@@ -177,7 +177,11 @@ async def test_camera_stream_failed_start_stream_call(hass: HomeAssistant) -> No
|
||||
assert not client.async_send_image_stream_stop.called
|
||||
|
||||
|
||||
async def test_device_info(hass: HomeAssistant) -> None:
|
||||
async def test_device_info(
|
||||
hass: HomeAssistant,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
entity_registry: er.EntityRegistry,
|
||||
) -> None:
|
||||
"""Verify device information includes expected details."""
|
||||
client = create_mock_client()
|
||||
|
||||
@@ -190,7 +194,6 @@ async def test_device_info(hass: HomeAssistant) -> None:
|
||||
await setup_test_config_entry(hass, hyperion_client=client)
|
||||
|
||||
device_id = get_hyperion_device_id(TEST_SYSINFO_ID, TEST_INSTANCE)
|
||||
device_registry = dr.async_get(hass)
|
||||
|
||||
device = device_registry.async_get_device(identifiers={(DOMAIN, device_id)})
|
||||
assert device
|
||||
@@ -200,7 +203,6 @@ async def test_device_info(hass: HomeAssistant) -> None:
|
||||
assert device.model == HYPERION_MODEL_NAME
|
||||
assert device.name == TEST_INSTANCE_1["friendly_name"]
|
||||
|
||||
entity_registry = er.async_get(hass)
|
||||
entities_from_device = [
|
||||
entry.entity_id
|
||||
for entry in er.async_entries_for_device(entity_registry, device.id)
|
||||
|
||||
Reference in New Issue
Block a user