mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-10-11 09:10:45 +00:00
Update Directions In TUTORIAL.md; Add Unit Tests To non_user_endpoints test.py (#1136)
* Update navigational directions in Step 1(A) * Combine directions in Step 1(B) and Step 2(C) and remove Step 2(C) * Update navigational directions and verbage in Step 1(C) * Change reference from Step 1(C) to Step 1(B) in Step 2(D) * Update capitalization in Prerequisites Step 3 * Add directions for installing Spotipy in Prerequisites Step 1(A) * List updates to TUTORIAL.md file in CHANGELOG.md * Update docstrings for funcs in lines 340-585 * Add unit tests for artist ID and URL * Add test_artists_mixed_ids * Updated CHANGELOG.md and TUTORIAL.md as requested * Update client.py and test.py * Fix linting issue * Remove duplicate line; Change order of prerequisites * Update local repo * Add test_artists_mixed_ids * Add Radiohead ID and URL; Add qotsa URL * Add test_artist_url * Comment out three failing tests * Fix linting errors * Uncommenting out failed tests * Add test_artist_id * List changes in CHANGELOG.md * Add line breaks at the end of files. * Remove multiple spaces Also I've removed a sentence that just doesn't make sense in my eyes, but was added before this PR. --------- Co-authored-by: Niko <github@dieserniko.link>
This commit is contained in:
1 parent
8f003147f7
commit
d92951b356
6 files changed
+76
-61
No files matched your search
@@ -37,12 +37,19 @@ class AuthTestSpotipy(unittest.TestCase):
|
||||
creep_urn = 'spotify:track:6b2oQwSGFkzsMtQruIWm2p'
|
||||
creep_id = '6b2oQwSGFkzsMtQruIWm2p'
|
||||
creep_url = 'http://open.spotify.com/track/6b2oQwSGFkzsMtQruIWm2p'
|
||||
|
||||
el_scorcho_urn = 'spotify:track:0Svkvt5I79wficMFgaqEQJ'
|
||||
el_scorcho_bad_urn = 'spotify:track:0Svkvt5I79wficMFgaqEQK'
|
||||
pinkerton_urn = 'spotify:album:04xe676vyiTeYNXw15o9jT'
|
||||
weezer_urn = 'spotify:artist:3jOstUTkEu2JkjvRdBA5Gu'
|
||||
|
||||
pablo_honey_urn = 'spotify:album:6AZv3m27uyRxi8KyJSfUxL'
|
||||
radiohead_urn = 'spotify:artist:4Z8W4fKeB5YxbusRsdQVPb'
|
||||
radiohead_id = "4Z8W4fKeB5YxbusRsdQVPb"
|
||||
radiohead_url = "https://open.spotify.com/artist/4Z8W4fKeB5YxbusRsdQVPb"
|
||||
|
||||
qotsa_url = "https://open.spotify.com/artist/4pejUc4iciQfgdX6OKulQn"
|
||||
|
||||
angeles_haydn_urn = 'spotify:album:1vAbqAeuJVWNAe7UR00bdM'
|
||||
heavyweight_urn = 'spotify:show:5c26B28vZMN8PG0Nppmn5G'
|
||||
heavyweight_id = '5c26B28vZMN8PG0Nppmn5G'
|
||||
@@ -101,11 +108,24 @@ class AuthTestSpotipy(unittest.TestCase):
|
||||
artist = self.spotify.artist(self.radiohead_urn)
|
||||
self.assertTrue(artist['name'] == 'Radiohead')
|
||||
|
||||
def test_artist_url(self):
|
||||
artist = self.spotify.artist(self.radiohead_url)
|
||||
self.assertTrue(artist['name'] == 'Radiohead')
|
||||
|
||||
def test_artist_id(self):
|
||||
artist = self.spotify.artist(self.radiohead_id)
|
||||
self.assertTrue(artist['name'] == 'Radiohead')
|
||||
|
||||
def test_artists(self):
|
||||
results = self.spotify.artists([self.weezer_urn, self.radiohead_urn])
|
||||
self.assertTrue('artists' in results)
|
||||
self.assertTrue(len(results['artists']) == 2)
|
||||
|
||||
def test_artists_mixed_ids(self):
|
||||
results = self.spotify.artists([self.weezer_urn, self.radiohead_id, self.qotsa_url])
|
||||
self.assertTrue('artists' in results)
|
||||
self.assertTrue(len(results['artists']) == 3)
|
||||
|
||||
def test_album_urn(self):
|
||||
album = self.spotify.album(self.pinkerton_urn)
|
||||
self.assertTrue(album['name'] == 'Pinkerton')
|
||||
|
||||
Reference in new issue
Block a user