From 04786e019aa8094634148227f5f07b1ba7b9439f Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Mon, 1 Apr 2024 00:42:46 +0200 Subject: [PATCH] Use device registry mock instead of `hass.helpers` in traccar_server tests (#114532) --- tests/components/traccar_server/test_diagnostics.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/components/traccar_server/test_diagnostics.py b/tests/components/traccar_server/test_diagnostics.py index 3d112057315..faf1b628fcd 100644 --- a/tests/components/traccar_server/test_diagnostics.py +++ b/tests/components/traccar_server/test_diagnostics.py @@ -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,