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

Update tests a-b to use async_get() instead of async_get_registry() (#47651)

This commit is contained in:
Erik Montnemery
2021-03-09 14:24:34 +01:00
committed by GitHub
parent 3a054c3be7
commit 78b21b1ad1
40 changed files with 110 additions and 86 deletions

View File

@@ -1,5 +1,4 @@
"""BleBox climate entities tests."""
import logging
from unittest.mock import AsyncMock, PropertyMock
@@ -28,6 +27,7 @@ from homeassistant.const import (
ATTR_TEMPERATURE,
STATE_UNKNOWN,
)
from homeassistant.helpers import device_registry as dr
from .conftest import async_setup_entity, mock_feature
@@ -79,7 +79,7 @@ async def test_init(saunabox, hass, config):
assert state.state == STATE_UNKNOWN
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.name == "My sauna"