mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
* Monkeypatch fetch user and use pytest.tempdir * Cover spotify_tools.grab_album() * Cover avconv conversion * Cover grab_single() * Reduce code repetition * Move grab_playlist() to spotify_tools.py * Move Spotify specific functions to spotify_tools.py * Refactoring * Return track list from write_tracks() * Fix tests * Cover more cases in generate_youtube_url() * Test for unavailable audio streams * Test for filename without spaces * handle.py 100% coverage * Improve config tests * Speed up tests * Install avconv and libfdk-aac * Some cleaning * FFmpeg with libfdk-aac, libopus * Some refactoring * Convert tmpdir to string * Cover YouTube title when downloading from list * Explicitly cover some internals.py functions
19 lines
476 B
Python
19 lines
476 B
Python
from core import const
|
|
|
|
import spotdl
|
|
import loader
|
|
import os
|
|
|
|
loader.load_defaults()
|
|
|
|
|
|
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)
|
|
downloaded_song, *_ = spotdl.download_list(file_path)
|
|
assert downloaded_song == song
|