Skip to content

Commit 32f9e2d

Browse files
committed
fix tests
1 parent 9246416 commit 32f9e2d

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
@@ -4,7 +4,7 @@
44
from mopidy import audio
55
from mopidy import backend as backend_api
66

7-
from mopidy_spotify import backend
7+
from mopidy_spotify import backend, web
88

99

1010
@pytest.fixture
@@ -16,6 +16,7 @@ def audio_mock():
1616
def backend_mock(config):
1717
backend_mock = mock.Mock(spec=backend.SpotifyBackend)
1818
backend_mock._config = config
19+
backend_mock._web_client = mock.Mock(spec=web.OAuthClient)
1920
return backend_mock
2021

2122

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

3839
assert mock_source.set_property.mock_calls == [
39-
mock.call("access-token", mock.ANY),
4040
mock.call("bitrate", "160"),
4141
mock.call("cache-credentials", cred_dir),
42+
mock.call("access-token", mock.ANY),
4243
mock.call("cache-files", spotify_cache_dir),
4344
mock.call("cache-max-size", 8589934592),
4445
]
@@ -52,9 +53,9 @@ def test_on_source_setup_without_caching(config, provider):
5253
cred_dir = spotify_data_dir / "credentials-cache"
5354

5455
assert mock_source.set_property.mock_calls == [
55-
mock.call("access-token", mock.ANY),
5656
mock.call("bitrate", "160"),
5757
mock.call("cache-credentials", cred_dir),
58+
mock.call("access-token", mock.ANY),
5859
]
5960

6061

0 commit comments

Comments
 (0)