Use device registry mock instead of hass.helpers in traccar_server tests (#114532)

This commit is contained in:
Jan-Philipp Benecke 2024-04-01 00:42:46 +02:00 committed by GitHub
parent ecf286cd81
commit 04786e019a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,