Cleanup deprecated async_get_registry in tests (#72059)

This commit is contained in:
epenet
2022-05-18 13:12:38 +02:00
committed by GitHub
parent 8492f282cb
commit 4eb46d45ca
19 changed files with 38 additions and 46 deletions
@@ -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]