Fixed problem with retry support

This commit is contained in:
Paul Lamere
2015-04-28 06:25:06 -04:00
parent 1b75562ce4
commit b96fd5ca8d
4 changed files with 14 additions and 6 deletions

View File

@@ -118,7 +118,8 @@ class TestSpotipy(unittest.TestCase):
def test_unauthenticated_post_fails(self):
with self.assertRaises(SpotifyException) as cm:
self.spotify.user_playlist_create("spotify", "Best hits of the 90s")
self.assertEqual(cm.exception.http_status, 401)
self.assertTrue(cm.exception.http_status == 401 or
cm.exception.http_status == 403)
def test_custom_requests_session(self):
from requests import Session