improve coverage
This commit is contained in:
parent
da492e49f6
commit
f98274f0ec
5 changed files with 15 additions and 26 deletions
|
|
@ -86,6 +86,10 @@ class TestBrowsing:
|
|||
album = yt.get_album("MPREb_YuigcYm2erf") # album with track (#8) disabled/greyed out
|
||||
assert album["tracks"][7]["trackNumber"] is None
|
||||
|
||||
def test_get_album_errors(self, yt):
|
||||
with pytest.raises(Exception, match="Invalid album browseId"):
|
||||
yt.get_album("asdf")
|
||||
|
||||
def test_get_album_other_versions(self, yt):
|
||||
# Eminem - Curtain Call: The Hits (Explicit Variant)
|
||||
album = yt.get_album("MPREb_LQCAymzbaKJ")
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
import pytest
|
||||
|
||||
|
||||
class TestWatch:
|
||||
def test_get_watch_playlist(self, config, yt, yt_brand, yt_oauth):
|
||||
playlist = yt_oauth.get_watch_playlist(
|
||||
|
|
@ -14,3 +17,7 @@ class TestWatch:
|
|||
assert len(playlist["tracks"]) == config.getint("albums", "album_track_length")
|
||||
playlist = yt_brand.get_watch_playlist(playlistId=config["playlists"]["own"], shuffle=True)
|
||||
assert len(playlist["tracks"]) == config.getint("playlists", "own_length")
|
||||
|
||||
def test_get_watch_playlist_errors(self, config, yt):
|
||||
with pytest.raises(Exception, match="No content returned by the server"):
|
||||
yt.get_watch_playlist(playlistId="PL_NOT_EXIST")
|
||||
|
|
|
|||
Loading…
Reference in a new issue