From 49f46264c784c9fc1e03dce86aedf77d6aeb9982 Mon Sep 17 00:00:00 2001 From: Gustavo Krieger Date: Fri, 23 Apr 2021 14:41:11 -0300 Subject: [PATCH] change assertGreater to assertGreaterEqual in some tests (#679) --- tests/integration/test_user_endpoints.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration/test_user_endpoints.py b/tests/integration/test_user_endpoints.py index 206b419..f4758ad 100644 --- a/tests/integration/test_user_endpoints.py +++ b/tests/integration/test_user_endpoints.py @@ -237,9 +237,8 @@ class SpotipyLibraryApiTests(unittest.TestCase): self.spotify.track('BadID123') def test_current_user_saved_tracks(self): - # TODO make this not fail if someone doesnthave saved tracks tracks = self.spotify.current_user_saved_tracks() - self.assertGreater(len(tracks['items']), 0) + self.assertGreaterEqual(len(tracks['items']), 0) def test_current_user_save_and_unsave_tracks(self): tracks = self.spotify.current_user_saved_tracks() @@ -324,7 +323,7 @@ class SpotipyUserApiTests(unittest.TestCase): def test_current_user_top_tracks(self): response = self.spotify.current_user_top_tracks() items = response['items'] - self.assertGreater(len(items), 0) + self.assertGreaterEqual(len(items), 0) def test_current_user_top_artists(self): response = self.spotify.current_user_top_artists() @@ -390,7 +389,7 @@ class SpotipyFollowApiTests(unittest.TestCase): def test_current_user_follows(self): response = self.spotify.current_user_followed_artists() artists = response['artists'] - self.assertGreater(len(artists['items']), 0) + self.assertGreaterEqual(len(artists['items']), 0) def test_user_follows_and_unfollows_artist(self): # Initially follows 1 artist