Skip to content

Commit 3d90a23

Browse files
committed
fix tests
1 parent 2f8a3d4 commit 3d90a23

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_playback.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
from mopidy import audio
55
from mopidy import backend as backend_api
6-
from mopidy_spotify import backend
6+
from mopidy_spotify import backend, web
77

88

99
@pytest.fixture()
@@ -15,6 +15,7 @@ def audio_mock():
1515
def backend_mock(config):
1616
backend_mock = mock.Mock(spec=backend.SpotifyBackend)
1717
backend_mock._config = config
18+
backend_mock._web_client = mock.Mock(spec=web.OAuthClient)
1819
return backend_mock
1920

2021

@@ -35,9 +36,9 @@ def test_on_source_setup_sets_properties(config, provider):
3536
cred_dir = spotify_data_dir / "credentials-cache"
3637

3738
assert mock_source.set_property.mock_calls == [
38-
mock.call("access-token", mock.ANY),
3939
mock.call("bitrate", "160"),
4040
mock.call("cache-credentials", cred_dir),
41+
mock.call("access-token", mock.ANY),
4142
mock.call("cache-files", spotify_cache_dir),
4243
mock.call("cache-max-size", 8589934592),
4344
]
@@ -51,9 +52,9 @@ def test_on_source_setup_without_caching(config, provider):
5152
cred_dir = spotify_data_dir / "credentials-cache"
5253

5354
assert mock_source.set_property.mock_calls == [
54-
mock.call("access-token", mock.ANY),
5555
mock.call("bitrate", "160"),
5656
mock.call("cache-credentials", cred_dir),
57+
mock.call("access-token", mock.ANY),
5758
]
5859

5960

0 commit comments

Comments
 (0)