Update tests p-s to use async_get() instead of async_get_registry() (#47654)
This commit is contained in:
parent
b3fecb1c95
commit
ba2978c693
29 changed files with 103 additions and 86 deletions
|
@ -22,6 +22,7 @@ from homeassistant.const import (
|
|||
ATTR_SUPPORTED_FEATURES,
|
||||
STATE_UNAVAILABLE,
|
||||
)
|
||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||
|
||||
from .conftest import setup_platform
|
||||
|
@ -59,8 +60,8 @@ async def test_entity_and_device_attributes(hass, device_factory):
|
|||
)
|
||||
# Act
|
||||
await setup_platform(hass, FAN_DOMAIN, devices=[device])
|
||||
entity_registry = await hass.helpers.entity_registry.async_get_registry()
|
||||
device_registry = await hass.helpers.device_registry.async_get_registry()
|
||||
entity_registry = er.async_get(hass)
|
||||
device_registry = dr.async_get(hass)
|
||||
# Assert
|
||||
entry = entity_registry.async_get("fan.fan_1")
|
||||
assert entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue