mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 12:30:31 +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
@@ -290,14 +290,16 @@ async def test_config_entry(
|
||||
|
||||
|
||||
async def test_device(
|
||||
hass: HomeAssistant, hass_client: ClientSessionGenerator, utcnow
|
||||
hass: HomeAssistant,
|
||||
hass_client: ClientSessionGenerator,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
utcnow,
|
||||
) -> None:
|
||||
"""Test generating diagnostics for a device entry."""
|
||||
accessories = await setup_accessories_from_file(hass, "koogeek_ls1.json")
|
||||
config_entry, _ = await setup_test_accessories(hass, accessories)
|
||||
|
||||
connection = hass.data[KNOWN_DEVICES]["00:00:00:00:00:00"]
|
||||
device_registry = dr.async_get(hass)
|
||||
device = device_registry.async_get(connection.devices[1])
|
||||
|
||||
diag = await get_diagnostics_for_device(hass, hass_client, config_entry, device)
|
||||
|
||||
Reference in New Issue
Block a user