1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Update tests t-z to use async_get() instead of async_get_registry() (#47655)

This commit is contained in:
Erik Montnemery
2021-03-09 14:25:03 +01:00
committed by GitHub
parent 78b21b1ad1
commit b3fecb1c95
34 changed files with 171 additions and 170 deletions

View File

@@ -23,7 +23,7 @@ from homeassistant.components.unifi.const import (
DOMAIN as UNIFI_DOMAIN,
)
from homeassistant.const import STATE_HOME, STATE_NOT_HOME, STATE_UNAVAILABLE
from homeassistant.helpers import entity_registry
from homeassistant.helpers import device_registry as dr, entity_registry as er
import homeassistant.util.dt as dt_util
from .test_controller import ENTRY_CONFIG, setup_unifi_integration
@@ -335,9 +335,9 @@ async def test_tracked_devices(hass, aioclient_mock, mock_unifi_websocket):
await hass.async_block_till_done()
# Verify device registry has been updated
entity_registry = await hass.helpers.entity_registry.async_get_registry()
entity_registry = er.async_get(hass)
entry = entity_registry.async_get("device_tracker.device_2")
device_registry = await hass.helpers.device_registry.async_get_registry()
device_registry = dr.async_get(hass)
device = device_registry.async_get(entry.device_id)
assert device.sw_version == event["version_to"]
@@ -949,7 +949,7 @@ async def test_restoring_client(hass, aioclient_mock):
entry_id=1,
)
registry = await entity_registry.async_get_registry(hass)
registry = er.async_get(hass)
registry.async_get_or_create(
TRACKER_DOMAIN,
UNIFI_DOMAIN,