Test YouTube track title

This commit is contained in:
Ritiek
2017-06-25 00:31:57 +05:30
parent 10c3c66483
commit 0dfaf183b5
4 changed files with 24 additions and 18 deletions

15
test/test_basic.py Normal file
View File

@@ -0,0 +1,15 @@
# -*- coding: UTF-8 -*-
import spotdl
raw_song = "http://open.spotify.com/track/2e0jnySVkYF1pvBlpoNX1Y"
def test_spotify():
expected_title = "David André Østby - Tilbake (SAEVIK Remix)"
title = spotdl.generate_songname(raw_song)
assert title == expected_title
def test_youtube_title():
expected_url = "youtube.com/watch?v=zkD4smbefbc"
url = spotdl.generate_youtube_url(raw_song)
assert url == expected_url

View File

@@ -1,9 +0,0 @@
# -*- coding: UTF-8 -*-
import spotdl
def test_songname():
song = "http://open.spotify.com/track/2e0jnySVkYF1pvBlpoNX1Y"
expected_title = "David André Østby - Tilbake (SAEVIK Remix)"
title = spotdl.generate_songname(song)
assert title == expected_title