Remove deprecated Artist.get_cover_image, User.get_artist_tracks and STATUS_TOKEN_ERROR

This commit is contained in:
Hugo van Kemenade 2020-09-12 00:21:12 +03:00
parent bf753884c4
commit 85f58472a3
3 changed files with 1 additions and 81 deletions

View file

@ -241,16 +241,12 @@ class TestPyLastArtist(TestPyLastWithLastFm):
url = artist1.get_url()
mbid = artist1.get_mbid()
with pytest.warns(DeprecationWarning):
image = artist1.get_cover_image()
playcount = artist1.get_playcount()
streamable = artist1.is_streamable()
name = artist1.get_name(properly_capitalized=False)
name_cap = artist1.get_name(properly_capitalized=True)
# Assert
assert "https" in image
assert playcount > 1
assert artist1 != artist2
assert name.lower() == name_cap.lower()

View file

@ -6,7 +6,6 @@ import calendar
import datetime as dt
import os
import re
import warnings
import pytest
@ -475,15 +474,3 @@ class TestPyLastUser(TestPyLastWithLastFm):
# Assert
self.helper_validate_results(result1, result2, result3)
def test_get_artist_tracks_deprecated(self):
# Arrange
lastfm_user = self.network.get_user(self.username)
# Act / Assert
with warnings.catch_warnings(), pytest.raises(
pylast.WSError,
match="Deprecated - This type of request is no longer supported",
):
warnings.filterwarnings("ignore", category=DeprecationWarning)
lastfm_user.get_artist_tracks(artist="Test Artist")