mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
* added the ability to get all artist's songs as suggested by #366 * added log to featch_all_albums_from_artist function and removed the use of a uri * updated the functionality to get all albums with the ability to get singles * updated main function with new write_all_albums_from_artist function to get all albums from an artist * fixed typos * updated test case for getting all albums from artist * fixed typos
This commit is contained in:
committed by
Ritiek Malhotra
parent
e554b4252c
commit
2b42f0b3a1
@@ -7,6 +7,7 @@ from spotdl import spotdl
|
||||
|
||||
PLAYLIST_URL = "https://open.spotify.com/user/alex/playlist/0iWOVoumWlkXIrrBTSJmN8"
|
||||
ALBUM_URL = "https://open.spotify.com/album/499J8bIsEnU7DSrosFDJJg"
|
||||
ARTIST_URL = "https://open.spotify.com/artist/4dpARuHxo51G3z768sgnrY"
|
||||
|
||||
|
||||
def test_user_playlists(tmpdir, monkeypatch):
|
||||
@@ -37,6 +38,17 @@ def test_album(tmpdir):
|
||||
tracks = len(f.readlines())
|
||||
assert tracks == expect_tracks
|
||||
|
||||
def test_all_albums(tmpdir):
|
||||
#current number of tracks on spotify since as of 10/10/2018
|
||||
#in US market only
|
||||
expect_tracks = 49
|
||||
global text_file
|
||||
text_file = os.path.join(str(tmpdir), 'test_ab.txt')
|
||||
spotify_tools.write_all_albums_from_artist(ARTIST_URL, text_file)
|
||||
with open(text_file, 'r') as f:
|
||||
tracks = len(f.readlines())
|
||||
assert tracks == expect_tracks
|
||||
|
||||
|
||||
def test_trim():
|
||||
with open(text_file, "r") as track_file:
|
||||
|
||||
Reference in New Issue
Block a user