From e4c581bbb68d5fa5b2033ba9430fa104d1cde1ec Mon Sep 17 00:00:00 2001 From: Gustavo Krieger Date: Fri, 23 Apr 2021 14:41:50 -0300 Subject: [PATCH] add tearDownClass to unfollow test playlist after tests (#680) --- tests/integration/test_user_endpoints.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/integration/test_user_endpoints.py b/tests/integration/test_user_endpoints.py index f4758ad..904fb29 100644 --- a/tests/integration/test_user_endpoints.py +++ b/tests/integration/test_user_endpoints.py @@ -58,6 +58,10 @@ class SpotipyPlaylistApiTest(unittest.TestCase): cls.spotify.user_playlist_create(cls.username, cls.new_playlist_name) cls.new_playlist_uri = cls.new_playlist['uri'] + @classmethod + def tearDownClass(cls): + cls.spotify.current_user_unfollow_playlist(cls.new_playlist['id']) + def test_user_playlists(self): playlists = self.spotify.user_playlists(self.username, limit=5) self.assertTrue('items' in playlists)