mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
Update tests (#384)
* Update tests * Move comment regarding changing YT URLs to the appropriate assert
This commit is contained in:
committed by
Ritiek Malhotra
parent
6cb12722d0
commit
2725402ab3
@@ -1,18 +1,20 @@
|
||||
from spotdl import const
|
||||
|
||||
from spotdl import spotdl
|
||||
import loader
|
||||
import os
|
||||
|
||||
from spotdl import const
|
||||
from spotdl import spotdl
|
||||
|
||||
import loader
|
||||
|
||||
loader.load_defaults()
|
||||
|
||||
TRACK_URL = 'http://open.spotify.com/track/0JlS7BXXD07hRmevDnbPDU'
|
||||
|
||||
|
||||
def test_dry_download_list(tmpdir):
|
||||
song = 'http://open.spotify.com/track/0JlS7BXXD07hRmevDnbPDU'
|
||||
const.args.folder = str(tmpdir)
|
||||
const.args.dry_run = True
|
||||
file_path = os.path.join(const.args.folder, 'test_list.txt')
|
||||
with open(file_path, 'w') as tin:
|
||||
tin.write(song)
|
||||
with open(file_path, 'w') as f:
|
||||
f.write(TRACK_URL)
|
||||
downloaded_song, *_ = spotdl.download_list(file_path)
|
||||
assert downloaded_song == song
|
||||
assert downloaded_song == TRACK_URL
|
||||
|
||||
Reference in New Issue
Block a user