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 2f8a3d4 commit 3d90a23
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 @@ -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()
Expand All @@ -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


Expand All @@ -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),
]
Expand All @@ -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),
]


Expand Down

0 comments on commit 3d90a23

Please sign in to comment.