Exemplo n.º 1
0
 def test_as_track(self):
     l = Link.from_string("spotify:track:test_track")
     t = l.as_track()
     self.assertEqual(str(t), "track")
Exemplo n.º 2
0
 def test_as_album(self):
     l = Link.from_string("spotify:album:test_album")
     t = l.as_album()
     self.assertEqual(str(t), "album")
Exemplo n.º 3
0
 def test_str(self):
     s = "str_test"
     l = Link.from_string(s)
     self.assertEqual(str(l), "link:str_test")
Exemplo n.º 4
0
 def test_from_string(self):
     s = "spotify:artist:test"
     l = Link.from_string(s)
     self.assertEqual(str(l), "spotify:artist:test")
Exemplo n.º 5
0
 def test_as_album_badlink(self):
     l = Link.from_string("NOTalbum:as_album_test")
     self.assertRaises(SpotifyError, l.as_album)
Exemplo n.º 6
0
 def test_as_artist_badlink(self):
     l = Link.from_string("NOTartist:test_as_artist")
     self.assertRaises(SpotifyError, l.as_artist)
Exemplo n.º 7
0
 def test_as_track_badlink(self):
     l = Link.from_string("NOTtrack:as_track_test")
     self.assertRaises(SpotifyError, l.as_track)
Exemplo n.º 8
0
 def test_as_track_badlink(self):
     l = Link.from_string("NOTtrack:as_track_test")
     self.assertRaises(SpotifyError, l.as_track)
Exemplo n.º 9
0
 def test_str(self):
     s = "str_test"
     l = Link.from_string(s)
     self.assertEqual(str(l), "link:str_test")
Exemplo n.º 10
0
 def test_as_track(self):
     l = Link.from_string("track:as_track_test")
     t = l.as_track()
     self.assertEqual(str(t), "as_track_test")
Exemplo n.º 11
0
 def test_as_artist_badlink(self):
     l = Link.from_string("NOTartist:test_as_artist")
     self.assertRaises(SpotifyError, l.as_artist)
Exemplo n.º 12
0
 def test_as_album_badlink(self):
     l = Link.from_string("NOTalbum:as_album_test")
     self.assertRaises(SpotifyError, l.as_album)
Exemplo n.º 13
0
 def test_as_album(self):
     l = Link.from_string("album:as_album_test")
     t = l.as_album()
     self.assertEqual(str(t), "as_album_test")
Exemplo n.º 14
0
 def test_as_artist(self):
     l = Link.from_string("spotify:artist:test_artist")
     a = l.as_artist()
     self.assertEqual(str(a), "artist")
Exemplo n.º 15
0
 def test_as_album(self):
     l = Link.from_string("album:as_album_test")
     t = l.as_album()
     self.assertEqual(str(t), "as_album_test")
Exemplo n.º 16
0
 def test_as_string(self):
     s = "spotify:track:str_test"
     l = Link.from_string(s)
     self.assertEqual(str(l), "spotify:track:str_test")
Exemplo n.º 17
0
 def test_as_track(self):
     l = Link.from_string("track:as_track_test")
     t = l.as_track()
     self.assertEqual(str(t), "as_track_test")