From 9bf8df26ce3f18612521d147cf1f24bb27d082f2 Mon Sep 17 00:00:00 2001 From: Niko Date: Tue, 3 Dec 2024 13:03:01 +0100 Subject: [PATCH] remove test cases associated with deprecated methods --- tests/integration/non_user_endpoints/test.py | 39 -------------------- tests/integration/user_endpoints/test.py | 31 ---------------- 2 files changed, 70 deletions(-) diff --git a/tests/integration/non_user_endpoints/test.py b/tests/integration/non_user_endpoints/test.py index 2aa878b5..366e24cf 100644 --- a/tests/integration/non_user_endpoints/test.py +++ b/tests/integration/non_user_endpoints/test.py @@ -73,34 +73,6 @@ def setUpClass(self): client_credentials_manager=SpotifyClientCredentials()) self.spotify.trace = False - def test_audio_analysis(self): - result = self.spotify.audio_analysis(self.four_tracks[0]) - assert ('beats' in result) - - def test_audio_features(self): - results = self.spotify.audio_features(self.four_tracks) - self.assertTrue(len(results) == len(self.four_tracks)) - for track in results: - assert ('speechiness' in track) - - def test_audio_features_with_bad_track(self): - bad_tracks = ['spotify:track:bad'] - input = self.four_tracks + bad_tracks - results = self.spotify.audio_features(input) - self.assertTrue(len(results) == len(input)) - for track in results[:-1]: - if track is not None: - assert ('speechiness' in track) - self.assertTrue(results[-1] is None) - - def test_recommendations(self): - results = self.spotify.recommendations( - seed_tracks=self.four_tracks, - min_danceability=0, - max_loudness=0, - target_popularity=50) - self.assertTrue(len(results['tracks']) == 20) - def test_artist_urn(self): artist = self.spotify.artist(self.radiohead_urn) self.assertTrue(artist['name'] == 'Radiohead') @@ -179,17 +151,6 @@ def test_artist_top_tracks(self): self.assertTrue('tracks' in results) self.assertTrue(len(results['tracks']) == 10) - def test_artist_related_artists(self): - results = self.spotify.artist_related_artists(self.weezer_urn) - self.assertTrue('artists' in results) - self.assertTrue(len(results['artists']) == 20) - - found = False - for artist in results['artists']: - if artist['name'] == 'Jimmy Eat World': - found = True - self.assertTrue(found) - def test_artist_search(self): results = self.spotify.search(q='weezer', type='artist') self.assertTrue('artists' in results) diff --git a/tests/integration/user_endpoints/test.py b/tests/integration/user_endpoints/test.py index fb1fbb21..9e5411f2 100644 --- a/tests/integration/user_endpoints/test.py +++ b/tests/integration/user_endpoints/test.py @@ -393,33 +393,6 @@ def test_categories_limit_high(self): response = self.spotify.categories(limit=50) self.assertLessEqual(len(response['categories']['items']), 50) - def test_category_playlists(self): - response = self.spotify.categories() - category = 'rock' - for cat in response['categories']['items']: - cat_id = cat['id'] - if cat_id == category: - response = self.spotify.category_playlists(category_id=cat_id) - self.assertGreater(len(response['playlists']["items"]), 0) - - def test_category_playlists_limit_low(self): - response = self.spotify.categories() - category = 'rock' - for cat in response['categories']['items']: - cat_id = cat['id'] - if cat_id == category: - response = self.spotify.category_playlists(category_id=cat_id, limit=1) - self.assertEqual(len(response['categories']['items']), 1) - - def test_category_playlists_limit_high(self): - response = self.spotify.categories() - category = 'rock' - for cat in response['categories']['items']: - cat_id = cat['id'] - if cat_id == category: - response = self.spotify.category_playlists(category_id=cat_id, limit=50) - self.assertLessEqual(len(response['categories']['items']), 50) - def test_new_releases(self): response = self.spotify.new_releases() self.assertGreater(len(response['albums']['items']), 0) @@ -432,10 +405,6 @@ def test_new_releases_limit_high(self): response = self.spotify.new_releases(limit=50) self.assertLessEqual(len(response['albums']['items']), 50) - def test_featured_releases(self): - response = self.spotify.featured_playlists() - self.assertGreater(len(response['playlists']), 0) - class SpotipyFollowApiTests(unittest.TestCase): @classmethod