Combined assertion tests, fixes #1051 (#1052)

* addressed issue 936

* publish branch

* 12/9/2023

* Update CHANGELOG.md

---------

Co-authored-by: Stéphane Bruckert <stephane.bruckert@gmail.com>
This commit is contained in:
Shukie LiandStéphane Bruckert authored and GitHub committed 2024-05-30 19:29:32 +01:00
1 parent 62a27a20e0
commit df27fe93bf
2 files changed
+17 -1

No files matched your search

+14 -1
View File
@@ -253,7 +253,7 @@ class SpotipyLibraryApiTests(unittest.TestCase):
tracks = self.spotify.current_user_saved_tracks()
self.assertGreaterEqual(len(tracks['items']), 0)
def test_current_user_save_and_unsave_tracks(self):
def test_current_user_save_tracks(self):
tracks = self.spotify.current_user_saved_tracks()
total = tracks['total']
self.spotify.current_user_saved_tracks_add(self.four_tracks)
@@ -266,6 +266,19 @@ class SpotipyLibraryApiTests(unittest.TestCase):
self.four_tracks)
tracks = self.spotify.current_user_saved_tracks()
new_total = tracks['total']
def test_current_user_unsave_tracks(self):
tracks = self.spotify.current_user_saved_tracks()
total = tracks['total']
self.spotify.current_user_saved_tracks_add(self.four_tracks)
tracks = self.spotify.current_user_saved_tracks()
new_total = tracks['total']
self.spotify.current_user_saved_tracks_delete(
self.four_tracks)
tracks = self.spotify.current_user_saved_tracks()
new_total = tracks['total']
self.assertEqual(new_total, total)
def test_current_user_saved_albums(self):