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,6 +16,7 @@ from homeassistant.const import (
STATE_HOME,
STATE_NOT_HOME,
)
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.setup import async_setup_component
from homeassistant.util import slugify
@@ -223,10 +224,10 @@ async def test_gps_enter_and_exit_home(hass, geofency_client, webhook_id):
]
assert NOT_HOME_LONGITUDE == current_longitude
dev_reg = await hass.helpers.device_registry.async_get_registry()
dev_reg = dr.async_get(hass)
assert len(dev_reg.devices) == 1
ent_reg = await hass.helpers.entity_registry.async_get_registry()
ent_reg = er.async_get(hass)
assert len(ent_reg.entities) == 1