Implement data coordinator for LastFM (#96942)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
This commit is contained in:
parent
e96bff1674
commit
fe66c3414b
6 changed files with 158 additions and 62 deletions
|
@ -14,7 +14,7 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.helpers import issue_registry as ir
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from . import API_KEY, USERNAME_1
|
||||
from . import API_KEY, USERNAME_1, MockUser
|
||||
from .conftest import ComponentSetup
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
@ -28,7 +28,7 @@ LEGACY_CONFIG = {
|
|||
|
||||
async def test_legacy_migration(hass: HomeAssistant) -> None:
|
||||
"""Test migration from yaml to config flow."""
|
||||
with patch("pylast.User", return_value=None):
|
||||
with patch("pylast.User", return_value=MockUser()):
|
||||
assert await async_setup_component(hass, Platform.SENSOR, LEGACY_CONFIG)
|
||||
await hass.async_block_till_done()
|
||||
entries = hass.config_entries.async_entries(DOMAIN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue