diff --git a/deploy b/deploy index f18302a..ea1b5aa 100755 --- a/deploy +++ b/deploy @@ -1,6 +1,6 @@ # # sudo python setup.py develop --uninstall -# sudo python setup.py install +# sudo python setup.py install # How do deploy # - run tests @@ -9,7 +9,7 @@ # - Update README.md with updated version info # - leave development mode # sudo python setup.py develop --uninstall -# sudo python setup.py install +# sudo python setup.py install # - upload dist # sudo python setup.py sdist upload # docs should automatically be updated. verify them at diff --git a/tests/test_auth.py b/tests/test_auth.py index e72807b..d921aff 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -45,15 +45,15 @@ class AuthTestSpotipy(unittest.TestCase): """ playlist = "spotify:user:plamere:playlist:2oCEWyyAPbZp9xhVSxZavx" - four_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", + four_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", "spotify:track:7IHOIqZUUInxjVkko181PB", - "4VrWlk8IQxevMvERoX08iC", + "4VrWlk8IQxevMvERoX08iC", "http://open.spotify.com/track/3cySlItpiPiIAzU3NyHCJf"] - two_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", + two_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", "spotify:track:7IHOIqZUUInxjVkko181PB"] - other_tracks=["spotify:track:2wySlB6vMzCbQrRnNGOYKa", + other_tracks=["spotify:track:2wySlB6vMzCbQrRnNGOYKa", "spotify:track:29xKs5BAHlmlX1u4gzQAbJ", "spotify:track:1PB7gRWcvefzu7t3LJLUlf"] @@ -115,7 +115,7 @@ class AuthTestSpotipy(unittest.TestCase): results = self.spotify.user_playlist_tracks(user, pid) self.assertTrue(len(results['items']) >= 0) - def user_playlist_tracks(self, user, playlist_id = None, fields=None, + def user_playlist_tracks(self, user, playlist_id = None, fields=None, limit=100, offset=0): # known API issue currently causes this test to fail @@ -176,7 +176,7 @@ class AuthTestSpotipy(unittest.TestCase): cat_id = cat['id'] response = self.spotify.category_playlists(category_id=cat_id) self.assertTrue(len(response['playlists']["items"]) > 0) - + def test_new_releases(self): response = self.spotify.new_releases() self.assertTrue(len(response['albums']) > 0) @@ -232,7 +232,7 @@ class AuthTestSpotipy(unittest.TestCase): # remove two tracks from it - self.spotify.user_playlist_remove_all_occurrences_of_tracks (self.username, + self.spotify.user_playlist_remove_all_occurrences_of_tracks (self.username, playlist_id, self.two_tracks) playlist = self.spotify.user_playlist(self.username, playlist_id) @@ -240,7 +240,7 @@ class AuthTestSpotipy(unittest.TestCase): self.assertTrue(len(playlist['tracks']['items']) == 2) # replace with 3 other tracks - self.spotify.user_playlist_replace_tracks(self.username, + self.spotify.user_playlist_replace_tracks(self.username, playlist_id, self.other_tracks) playlist = self.spotify.user_playlist(self.username, playlist_id) diff --git a/tests/test_auth2.py b/tests/test_auth2.py index d68667d..e52092a 100644 --- a/tests/test_auth2.py +++ b/tests/test_auth2.py @@ -41,15 +41,15 @@ class AuthTestSpotipy(unittest.TestCase): """ playlist = "spotify:user:plamere:playlist:2oCEWyyAPbZp9xhVSxZavx" - four_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", + four_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", "spotify:track:7IHOIqZUUInxjVkko181PB", - "4VrWlk8IQxevMvERoX08iC", + "4VrWlk8IQxevMvERoX08iC", "http://open.spotify.com/track/3cySlItpiPiIAzU3NyHCJf"] - two_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", + two_tracks = ["spotify:track:6RtPijgfPKROxEzTHNRiDp", "spotify:track:7IHOIqZUUInxjVkko181PB"] - other_tracks=["spotify:track:2wySlB6vMzCbQrRnNGOYKa", + other_tracks=["spotify:track:2wySlB6vMzCbQrRnNGOYKa", "spotify:track:29xKs5BAHlmlX1u4gzQAbJ", "spotify:track:1PB7gRWcvefzu7t3LJLUlf"] diff --git a/tests/tests.py b/tests/tests.py index 63ab860..a968494 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -76,7 +76,7 @@ class TestSpotipy(unittest.TestCase): def test_album_tracks(self): results = self.spotify.album_tracks(self.pinkerton_urn) self.assertTrue(len(results['items']) == 10) - + def test_album_tracks_many(self): results = self.spotify.album_tracks(self.angeles_haydn_urn) tracks = results['items']