Added the 'collaboration.py' example

This commit is contained in:
Paul Lamere
2014-04-07 13:10:25 -04:00
parent 2f36e11277
commit 9105e58562
7 changed files with 137 additions and 8 deletions

View File

@@ -60,6 +60,12 @@ class TestSpotipy(unittest.TestCase):
self.assertTrue(len(results['artists']) > 0)
self.assertTrue(results['artists'][0]['name'] == 'Weezer')
def test_artist_albums(self):
results = self.spotify.artist_albums(self.weezer_urn)
self.assertTrue('albums' in results)
self.assertTrue(len(results['albums']) > 0)
self.assertTrue(results['albums'][0]['artists'][0]['name'] == 'Weezer')
def test_album_search(self):
results = self.spotify.search(q='weezer pinkerton', type='album')
self.assertTrue('albums' in results)