mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Test YouTube track title
This commit is contained in:
15
test/test_basic.py
Normal file
15
test/test_basic.py
Normal 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user