Skip to content

Commit

Permalink
test: updated test case for returned playlist
Browse files Browse the repository at this point in the history
  • Loading branch information
sacklippe committed Jul 4, 2024
1 parent b4d1ddd commit 8ab1ca9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions tests/integrationtests/spotify/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ def test_find_track(spotify_session, tidal_track):
def test_add_to_playlist(spotify_session, create_playlist, spotify_track_list):
playlist = create_playlist
n_tracks_before = playlist.n_tracks
spotify_session.add_to_playlist(playlist, spotify_track_list)

spotify_response = spotify_session._client.playlist(playlist.playlist_id)
updated_playlist = Playlist.from_spotify(spotify_response)
updated_playlist = spotify_session.add_to_playlist(playlist, spotify_track_list)
n_tracks_after = updated_playlist.n_tracks

assert playlist.playlist_id == updated_playlist.playlist_id
assert n_tracks_before < n_tracks_after
6 changes: 2 additions & 4 deletions tests/integrationtests/tidal/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ def test_search_track(tidal_session, spotify_track):
def test_add_to_playlist(tidal_session, create_playlist, tidal_track_list):
playlist = create_playlist
n_tracks_before = playlist.n_tracks
tidal_session.add_to_playlist(playlist, tidal_track_list)

tidal_response = tidal_session._client.playlist(playlist.playlist_id)
updated_playlist = Playlist.from_tidal(tidal_response)
updated_playlist = tidal_session.add_to_playlist(playlist, tidal_track_list)
n_tracks_after = updated_playlist.n_tracks

assert playlist.playlist_id == updated_playlist.playlist_id
assert n_tracks_before < n_tracks_after

0 comments on commit 8ab1ca9

Please sign in to comment.