mirror of
https://github.com/elisspace/core.git
synced 2026-10-01 06:49:55 +00:00
Cleanup deprecated async_get_registry in tests (#72059)
This commit is contained in:
@@ -29,7 +29,7 @@ async def device_fixture(hass: HomeAssistant, mock_entry: MockEntityFixture):
|
||||
await hass.config_entries.async_setup(mock_entry.entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
device_registry = await dr.async_get_registry(hass)
|
||||
device_registry = dr.async_get(hass)
|
||||
|
||||
return list(device_registry.devices.values())[0]
|
||||
|
||||
@@ -48,7 +48,7 @@ async def subdevice_fixture(
|
||||
await hass.config_entries.async_setup(mock_entry.entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
device_registry = await dr.async_get_registry(hass)
|
||||
device_registry = dr.async_get(hass)
|
||||
|
||||
return [d for d in device_registry.devices.values() if d.name != "UnifiProtect"][0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user