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

Update tests c-h to use registry async_get (#47652)

This commit is contained in:
Erik Montnemery
2021-03-09 14:31:17 +01:00
committed by GitHub
parent ba2978c693
commit 87e7cebd36
49 changed files with 165 additions and 138 deletions

View File

@@ -16,7 +16,7 @@ from homeassistant.components.deconz.const import (
)
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN
from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PORT
from homeassistant.helpers import entity_registry
from homeassistant.helpers import entity_registry as er
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration
@@ -133,7 +133,7 @@ async def test_update_group_unique_id(hass):
},
)
registry = await entity_registry.async_get_registry(hass)
registry = er.async_get(hass)
# Create entity entry to migrate to new unique ID
registry.async_get_or_create(
LIGHT_DOMAIN,
@@ -172,7 +172,7 @@ async def test_update_group_unique_id_no_legacy_group_id(hass):
data={},
)
registry = await entity_registry.async_get_registry(hass)
registry = er.async_get(hass)
# Create entity entry to migrate to new unique ID
registry.async_get_or_create(
LIGHT_DOMAIN,