mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
Adding Spotify Tests
This commit is contained in:
parent
0938dd37e2
commit
8336a95eda
@ -5,10 +5,17 @@ class TestsConstants(Singleton):
|
|||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
if not super().created:
|
if not super().created:
|
||||||
self.EMPTY_STRING_ERROR_MSG = 'Downloader with Empty String should be empty list.'
|
self.EMPTY_STRING_ERROR_MSG = 'Downloader with Empty String should be empty list.'
|
||||||
self.SPOTIFY_TRACK_URL = 'https://open.spotify.com/track/7wpnz7hje4FbnjZuWQtJHP'
|
|
||||||
self.MUSIC_TITLE_STRING = 'Experience || AMV || Anime Mix'
|
self.MUSIC_TITLE_STRING = 'Experience || AMV || Anime Mix'
|
||||||
|
|
||||||
self.YT_MUSIC_URL = 'https://www.youtube.com/watch?v=MvJoiv842mk'
|
self.YT_MUSIC_URL = 'https://www.youtube.com/watch?v=MvJoiv842mk'
|
||||||
self.YT_MIX_URL = 'https://www.youtube.com/watch?v=ePjtnSPFWK8&list=RDMMePjtnSPFWK8&start_radio=1'
|
self.YT_MIX_URL = 'https://www.youtube.com/watch?v=ePjtnSPFWK8&list=RDMMePjtnSPFWK8&start_radio=1'
|
||||||
self.YT_PERSONAL_PLAYLIST_URL = 'https://www.youtube.com/playlist?list=PLbbKJHHZR9ShYuKAr71cLJCFbYE-83vhS'
|
self.YT_PERSONAL_PLAYLIST_URL = 'https://www.youtube.com/playlist?list=PLbbKJHHZR9ShYuKAr71cLJCFbYE-83vhS'
|
||||||
# Links from playlists in channels some times must be extracted with force by Downloader
|
# Links from playlists in channels some times must be extracted with force by Downloader
|
||||||
self.YT_CHANNEL_PLAYLIST_URL = 'https://www.youtube.com/watch?v=MvJoiv842mk&list=PLAI1099Tvk0zWU8X4dwc4vv4MpePQ4DLl'
|
self.YT_CHANNEL_PLAYLIST_URL = 'https://www.youtube.com/watch?v=MvJoiv842mk&list=PLAI1099Tvk0zWU8X4dwc4vv4MpePQ4DLl'
|
||||||
|
|
||||||
|
self.SPOTIFY_TRACK_URL = 'https://open.spotify.com/track/7wpnz7hje4FbnjZuWQtJHP'
|
||||||
|
self.SPOTIFY_PLAYLIST_URL = 'https://open.spotify.com/playlist/37i9dQZF1EIV9u4LtkBkSF'
|
||||||
|
self.SPOTIFY_ARTIST_URL = 'https://open.spotify.com/artist/4HF14RSTZQcEafvfPCFEpI'
|
||||||
|
self.SPOTIFY_ALBUM_URL = 'https://open.spotify.com/album/71O60S5gIJSIAhdnrDIh3N'
|
||||||
|
self.SPOTIFY_WRONG1_URL = 'https://open.spotify.com/wrongUrl'
|
||||||
|
self.SPOTIFY_WRONG2_URL = 'https://open.spotify.com/track/WrongID'
|
||||||
|
|||||||
62
Tests/VSpotifyTests.py
Normal file
62
Tests/VSpotifyTests.py
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
from Tests.TestBase import VulkanTesterBase
|
||||||
|
|
||||||
|
|
||||||
|
class VulkanSpotifyTest(VulkanTesterBase):
|
||||||
|
def __init__(self) -> None:
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
def test_spotifyTrack(self) -> bool:
|
||||||
|
musics = self._runner.run_coroutine(
|
||||||
|
self._searcher.search(self._constants.SPOTIFY_TRACK_URL))
|
||||||
|
|
||||||
|
if len(musics) > 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def test_spotifyPlaylist(self) -> bool:
|
||||||
|
musics = self._runner.run_coroutine(
|
||||||
|
self._searcher.search(self._constants.SPOTIFY_PLAYLIST_URL))
|
||||||
|
|
||||||
|
if len(musics) > 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def test_spotifyArtist(self) -> bool:
|
||||||
|
musics = self._runner.run_coroutine(
|
||||||
|
self._searcher.search(self._constants.SPOTIFY_ARTIST_URL))
|
||||||
|
|
||||||
|
if len(musics) > 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def test_spotifyAlbum(self) -> bool:
|
||||||
|
musics = self._runner.run_coroutine(
|
||||||
|
self._searcher.search(self._constants.SPOTIFY_ARTIST_URL))
|
||||||
|
|
||||||
|
if len(musics) > 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def test_spotifyWrongUrlOne(self) -> bool:
|
||||||
|
musics = self._runner.run_coroutine(
|
||||||
|
self._searcher.search(self._constants.SPOTIFY_WRONG1_URL))
|
||||||
|
|
||||||
|
print(musics)
|
||||||
|
if len(musics) == 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
def test_spotifyWrongUrlTwo(self) -> bool:
|
||||||
|
musics = self._runner.run_coroutine(
|
||||||
|
self._searcher.search(self._constants.SPOTIFY_WRONG2_URL))
|
||||||
|
|
||||||
|
print(musics)
|
||||||
|
if len(musics) == 0:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
@ -1,5 +1,8 @@
|
|||||||
from Tests.VDownloaderTests import VulkanDownloaderTest
|
from Tests.VDownloaderTests import VulkanDownloaderTest
|
||||||
|
from Tests.VSpotifyTests import VulkanSpotifyTest
|
||||||
|
|
||||||
|
|
||||||
tester = VulkanDownloaderTest()
|
tester = VulkanDownloaderTest()
|
||||||
|
# tester.run()
|
||||||
|
tester = VulkanSpotifyTest()
|
||||||
tester.run()
|
tester.run()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user