add tearDownClass to unfollow test playlist after tests (#680)

This commit is contained in:
Gustavo Krieger 2021-04-23 14:41:50 -03:00 committed by GitHub
parent 49f46264c7
commit e4c581bbb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)