From c687ab9ad1f8a709a89dcbe12e5c7df51f4d0806 Mon Sep 17 00:00:00 2001 From: Laura Stone Date: Wed, 12 Oct 2016 19:08:33 -0400 Subject: [PATCH] Remove references to nonexistent API call, fix missing dependency in README --- .gitignore | 5 ++++- README.md | 2 +- pylast/__init__.py | 18 ------------------ tests/test_pylast.py | 1 - 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index c7a6d7e..df70ab7 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,7 @@ coverage.xml docs/_build/ # PyBuilder -target/ \ No newline at end of file +target/ + +# Extras +.idea/ diff --git a/README.md b/README.md index 671e2af..d5bb5dd 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ export PYLAST_API_SECRET=TODO_ENTER_YOURS_HERE To run all unit and integration tests: ```sh -pip install pytest flaky +pip install pytest flaky mock py.test ``` diff --git a/pylast/__init__.py b/pylast/__init__.py index 88039dd..9ffe1d1 100644 --- a/pylast/__init__.py +++ b/pylast/__init__.py @@ -3331,24 +3331,6 @@ class User(_BaseObject, _Chartable): return seq - def get_neighbours(self, limit=50, cacheable=True): - """Returns a list of the user's friends.""" - - params = self._get_params() - if limit: - params['limit'] = limit - - doc = self._request( - self.ws_prefix + '.getNeighbours', cacheable, params) - - seq = [] - names = _extract_all(doc, 'name') - - for name in names: - seq.append(User(name, self.network)) - - return seq - def get_past_events(self, limit=50, cacheable=False): """ Returns a sequence of Event objects diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 58f16bd..fa76e9e 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -929,7 +929,6 @@ class TestPyLast(unittest.TestCase): # Skip the first one because Last.fm API is broken # self.helper_validate_cacheable(lastfm_user, "get_friends") self.helper_validate_cacheable(lastfm_user, "get_loved_tracks") - self.helper_validate_cacheable(lastfm_user, "get_neighbours") self.helper_validate_cacheable(lastfm_user, "get_past_events") self.helper_validate_cacheable(lastfm_user, "get_recent_tracks") self.helper_validate_cacheable(lastfm_user, "get_recommended_artists")