Merge pull request #213 from pylast/fix-positional-argument
Fix Album.get_tracks() positional argument
This commit is contained in:
commit
ac6b67ff1e
|
@ -1784,7 +1784,7 @@ class Album(_Opus):
|
||||||
|
|
||||||
return _extract_tracks(
|
return _extract_tracks(
|
||||||
self._request(
|
self._request(
|
||||||
self.ws_prefix + ".getInfo", cacheable=True), "tracks")
|
self.ws_prefix + ".getInfo", cacheable=True), self.network)
|
||||||
|
|
||||||
def get_url(self, domain_name=DOMAIN_ENGLISH):
|
def get_url(self, domain_name=DOMAIN_ENGLISH):
|
||||||
"""Returns the URL of the album or track page on the network.
|
"""Returns the URL of the album or track page on the network.
|
||||||
|
|
|
@ -1887,11 +1887,13 @@ class TestPyLast(unittest.TestCase):
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
tracks = album.get_tracks()
|
tracks = album.get_tracks()
|
||||||
|
url = tracks[0].get_url()
|
||||||
|
|
||||||
# Assert
|
# Assert
|
||||||
self.assertIsInstance(tracks, list)
|
self.assertIsInstance(tracks, list)
|
||||||
self.assertIsInstance(tracks[0], pylast.Track)
|
self.assertIsInstance(tracks[0], pylast.Track)
|
||||||
self.assertEqual(len(tracks), 4)
|
self.assertEqual(len(tracks), 4)
|
||||||
|
self.assertTrue(url.startswith("https://www.last.fm/music/test"))
|
||||||
|
|
||||||
@handle_lastfm_exceptions
|
@handle_lastfm_exceptions
|
||||||
def test_tags(self):
|
def test_tags(self):
|
||||||
|
|
Loading…
Reference in a new issue