Skip to content

Commit

Permalink
remove test cases associated with deprecated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dieser-niko authored Dec 3, 2024
1 parent 852f67b commit 9bf8df2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 70 deletions.
39 changes: 0 additions & 39 deletions tests/integration/non_user_endpoints/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand Down
31 changes: 0 additions & 31 deletions tests/integration/user_endpoints/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 9bf8df2

Please sign in to comment.