Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kingosticks committed Sep 25, 2024
1 parent 9246416 commit 32f9e2d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from mopidy import audio
from mopidy import backend as backend_api

from mopidy_spotify import backend
from mopidy_spotify import backend, web


@pytest.fixture
Expand All @@ -16,6 +16,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


Expand All @@ -36,9 +37,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),
]
Expand All @@ -52,9 +53,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),
]


Expand Down

0 comments on commit 32f9e2d

Please sign in to comment.