From 701dc383eaffe561138091a54ef837d8ffceeab8 Mon Sep 17 00:00:00 2001 From: Peter-Schorn Date: Wed, 14 Apr 2021 12:43:42 -0500 Subject: [PATCH] Fixed lint issues --- spotipy/client.py | 1 - tests/integration/user_endpoints/test.py | 3 ++- tests/unit/test_oauth.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spotipy/client.py b/spotipy/client.py index 7bf3b22..d8adae0 100644 --- a/spotipy/client.py +++ b/spotipy/client.py @@ -195,7 +195,6 @@ class Spotify: else: # Use the Requests API module as a "session". self._session = requests.api - def __del__(self): """Make sure the connection (pool) gets closed""" try: diff --git a/tests/integration/user_endpoints/test.py b/tests/integration/user_endpoints/test.py index a909907..a2bf6c8 100644 --- a/tests/integration/user_endpoints/test.py +++ b/tests/integration/user_endpoints/test.py @@ -11,6 +11,7 @@ from spotipy import ( import unittest from tests import helpers + def _make_spotify(scopes=None, retries=None): retries = retries or Spotify.max_retries @@ -27,6 +28,7 @@ def _make_spotify(scopes=None, retries=None): return spotify + class SpotipyPlaylistApiTest(unittest.TestCase): @classmethod def setUpClass(cls): @@ -66,7 +68,6 @@ class SpotipyPlaylistApiTest(unittest.TestCase): cls.spotify = _make_spotify(scopes=scope) cls.spotify_no_retry = _make_spotify(scopes=scope, retries=0) - cls.new_playlist_name = 'spotipy-playlist-test' cls.new_playlist = helpers.get_spotify_playlist( cls.spotify, cls.new_playlist_name, cls.username) or \ diff --git a/tests/unit/test_oauth.py b/tests/unit/test_oauth.py index ce21efc..2efdfc4 100644 --- a/tests/unit/test_oauth.py +++ b/tests/unit/test_oauth.py @@ -6,10 +6,9 @@ import unittest.mock as mock import urllib.parse as urllibparse from spotipy import SpotifyOAuth, SpotifyPKCE -from spotipy.cache_handler import CacheHandler from spotipy.oauth2 import SpotifyClientCredentials, SpotifyOauthError from spotipy.oauth2 import SpotifyStateError -from spotipy import CacheFileHandler +from spotipy import MemoryCacheHandler, CacheFileHandler patch = mock.patch DEFAULT = mock.DEFAULT @@ -228,6 +227,7 @@ class TestSpotifyClientCredentials(unittest.TestCase): oauth.get_access_token(check_cache=False) self.assertEqual(error.exception.error, 'invalid_client') + class SpotifyPKCECacheTest(unittest.TestCase): @patch.multiple(SpotifyPKCE,