From 3d90a231d38e2c7ad18cb95556f065ea4e25964a Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Wed, 25 Sep 2024 02:19:37 +0100 Subject: [PATCH] fix tests --- tests/test_playback.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_playback.py b/tests/test_playback.py index 8d1367f8..db667213 100644 --- a/tests/test_playback.py +++ b/tests/test_playback.py @@ -3,7 +3,7 @@ import pytest from mopidy import audio from mopidy import backend as backend_api -from mopidy_spotify import backend +from mopidy_spotify import backend, web @pytest.fixture() @@ -15,6 +15,7 @@ def audio_mock(): def backend_mock(config): backend_mock = mock.Mock(spec=backend.SpotifyBackend) backend_mock._config = config + backend_mock._web_client = mock.Mock(spec=web.OAuthClient) return backend_mock @@ -35,9 +36,9 @@ def test_on_source_setup_sets_properties(config, provider): cred_dir = spotify_data_dir / "credentials-cache" assert mock_source.set_property.mock_calls == [ - mock.call("access-token", mock.ANY), mock.call("bitrate", "160"), mock.call("cache-credentials", cred_dir), + mock.call("access-token", mock.ANY), mock.call("cache-files", spotify_cache_dir), mock.call("cache-max-size", 8589934592), ] @@ -51,9 +52,9 @@ def test_on_source_setup_without_caching(config, provider): cred_dir = spotify_data_dir / "credentials-cache" assert mock_source.set_property.mock_calls == [ - mock.call("access-token", mock.ANY), mock.call("bitrate", "160"), mock.call("cache-credentials", cred_dir), + mock.call("access-token", mock.ANY), ]