Implement data coordinator for LastFM (#96942)

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
This commit is contained in:
Joost Lekkerkerker 2023-07-24 19:39:46 +02:00 committed by GitHub
parent e96bff1674
commit fe66c3414b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 158 additions and 62 deletions

View file

@ -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)