From bdd1b8d5e5564fa15246d61770d4304e0c4c4c97 Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 18 Sep 2017 14:13:00 +0300 Subject: [PATCH 1/2] Add failing test --- tests/test_pylast.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 45cbd8f..2ece3c8 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -1887,11 +1887,13 @@ class TestPyLast(unittest.TestCase): # Act tracks = album.get_tracks() + url = tracks[0].get_url() # Assert self.assertIsInstance(tracks, list) self.assertIsInstance(tracks[0], pylast.Track) self.assertEqual(len(tracks), 4) + self.assertTrue(url.startswith("https://www.last.fm/music/test")) @handle_lastfm_exceptions def test_tags(self): From 96d921cdc2b8303f06bdba4e7b4ac033ed18b6e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mice=20P=C3=A1pai?= Date: Wed, 26 Apr 2017 01:10:16 +0200 Subject: [PATCH 2/2] Fix Album.get_tracks() error (wrong positional argument) --- pylast/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pylast/__init__.py b/pylast/__init__.py index daa1efe..32a5540 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -1784,7 +1784,7 @@ class Album(_Opus): return _extract_tracks( 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): """Returns the URL of the album or track page on the network.