mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-11 17:10:45 +00:00
Update category tests to fix 1 failing and 1 error test results (#886)
* update category tests to fix 1 failing and 1 error test results * update changelog
This commit is contained in:
1 parent
1265d7b915
commit
6f56504c2c
2 files changed
+207
-164
No files matched your search
@@ -352,8 +352,9 @@ class SpotipyBrowseApiTests(unittest.TestCase):
|
||||
cls.spotify = Spotify(auth=token)
|
||||
|
||||
def test_category(self):
|
||||
response = self.spotify.category('rock')
|
||||
self.assertTrue('name' in response)
|
||||
rock_cat_id = '0JQ5DAqbMKFDXXwE9BDJAr'
|
||||
response = self.spotify.category(rock_cat_id)
|
||||
self.assertEqual(response['name'], 'Rock')
|
||||
|
||||
def test_categories(self):
|
||||
response = self.spotify.categories()
|
||||
@@ -369,11 +370,11 @@ class SpotipyBrowseApiTests(unittest.TestCase):
|
||||
|
||||
def test_categories_limit_low(self):
|
||||
response = self.spotify.categories(limit=1)
|
||||
self.assertEqual(len(response['categories']), 1)
|
||||
self.assertEqual(len(response['categories']['items']), 1)
|
||||
|
||||
def test_categories_limit_high(self):
|
||||
response = self.spotify.categories(limit=50)
|
||||
self.assertLessEqual(len(response['categories']), 50)
|
||||
self.assertLessEqual(len(response['categories']['items']), 50)
|
||||
|
||||
def test_category_playlists(self):
|
||||
response = self.spotify.categories()
|
||||
|
||||
Reference in new issue
Block a user