Add conversion test

This commit is contained in:
Ritiek
2017-06-25 01:41:57 +05:30
parent 93244e46ec
commit e0fb227ea5
2 changed files with 13 additions and 2 deletions

View File

@@ -33,3 +33,13 @@ def test_download():
content = spotdl.go_pafy(raw_song)
download = spotdl.download_song(content)
assert download == expect_download
def test_convert():
expect_convert = True
content = spotdl.go_pafy(raw_song)
music_file = spotdl.misc.generate_filename(content.title)
music_file = spotdl.misc.fix_decoding(music_file)
input_song = music_file + spotdl.args.input_ext
output_song = music_file + spotdl.args.output_ext
convert = spotdl.convert.song(input_song, output_song)
assert convert == expect_convert