Skip to content

Commit

Permalink
test: add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sacklippe committed Jul 6, 2024
1 parent 729720b commit e2b7410
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/integrationtests/spotify/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,15 @@ def test_session_user(spotify_session):
assert isinstance(spotify_session.user, User)


def test_session_playlists(spotify_session):
def test_session_load_playlist_not_existing(spotify_session):
assert spotify_session.load_playlist("foo") is None


def test_session_load_existing_playlist(spotify_session):
assert isinstance(spotify_session.load_playlist("37i9dQZF1DX4wta20PHgwo"), Playlist)


def test_session_load_playlists(spotify_session):
assert all(isinstance(p, Playlist) for p in spotify_session.load_playlists())


Expand Down
9 changes: 9 additions & 0 deletions tests/integrationtests/tidal/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def test_session_user(tidal_session):
assert isinstance(tidal_session.user, User)


def test_session_load_not_existing_playlist(tidal_session):
assert tidal_session.load_playlist("foo") is None


def test_session_load_existing_playlist(tidal_session):
tidal_playlist = tidal_session.load_playlist("281820fd-30e6-4240-9356-e07244a37bc8")
assert isinstance(tidal_playlist, Playlist)


def test_session_load_playlists(tidal_session):
assert all(isinstance(p, Playlist) for p in tidal_session.load_playlists())

Expand Down

0 comments on commit e2b7410

Please sign in to comment.