mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use device registry mock instead of hass.helpers
in traccar_server tests (#114532)
This commit is contained in:
parent
ecf286cd81
commit
04786e019a
@ -49,14 +49,14 @@ async def test_device_diagnostics(
|
||||
await setup_integration(hass, mock_config_entry)
|
||||
|
||||
devices = dr.async_entries_for_config_entry(
|
||||
hass.helpers.device_registry.async_get(hass),
|
||||
device_registry,
|
||||
mock_config_entry.entry_id,
|
||||
)
|
||||
|
||||
assert len(devices) == 1
|
||||
|
||||
for device in dr.async_entries_for_config_entry(
|
||||
hass.helpers.device_registry.async_get(hass), mock_config_entry.entry_id
|
||||
device_registry, mock_config_entry.entry_id
|
||||
):
|
||||
result = await get_diagnostics_for_device(
|
||||
hass, hass_client, mock_config_entry, device=device
|
||||
@ -78,14 +78,14 @@ async def test_device_diagnostics_with_disabled_entity(
|
||||
await setup_integration(hass, mock_config_entry)
|
||||
|
||||
devices = dr.async_entries_for_config_entry(
|
||||
hass.helpers.device_registry.async_get(hass),
|
||||
device_registry,
|
||||
mock_config_entry.entry_id,
|
||||
)
|
||||
|
||||
assert len(devices) == 1
|
||||
|
||||
for device in dr.async_entries_for_config_entry(
|
||||
hass.helpers.device_registry.async_get(hass), mock_config_entry.entry_id
|
||||
device_registry, mock_config_entry.entry_id
|
||||
):
|
||||
for entry in er.async_entries_for_device(
|
||||
entity_registry,
|
||||
|
Loading…
x
Reference in New Issue
Block a user