Fix minor things from code inspection
This commit is contained in:
parent
3a7cc9c410
commit
c601d2f365
|
@ -244,7 +244,7 @@ class _Network(object):
|
|||
"""
|
||||
Returns an (API_KEY, API_SECRET, SESSION_KEY) tuple.
|
||||
"""
|
||||
return (self.api_key, self.api_secret, self.session_key)
|
||||
return self.api_key, self.api_secret, self.session_key
|
||||
|
||||
def _delay_call(self):
|
||||
"""
|
||||
|
|
4
setup.py
4
setup.py
|
@ -8,8 +8,8 @@ setup(
|
|||
author="Amr Hassan <amr.hassan@gmail.com>",
|
||||
install_requires=['six'],
|
||||
tests_require=['mock', 'pytest', 'coverage', 'pycodestyle', 'pyyaml',
|
||||
'pyflakes'],
|
||||
description=("A Python interface to Last.fm and Libre.fm"),
|
||||
'pyflakes', 'flaky'],
|
||||
description="A Python interface to Last.fm and Libre.fm",
|
||||
author_email="amr.hassan@gmail.com",
|
||||
url="https://github.com/pylast/pylast",
|
||||
classifiers=[
|
||||
|
|
|
@ -174,7 +174,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
|||
|
||||
# Act
|
||||
stringed = str(thing)
|
||||
repr = thing.__repr__()
|
||||
rep = thing.__repr__()
|
||||
title = thing.get_title()
|
||||
name = thing.get_name()
|
||||
playcount = thing.get_playcount()
|
||||
|
@ -182,7 +182,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
|||
|
||||
# Assert
|
||||
self.assertEqual(stringed, "Test Artist - Test Album")
|
||||
self.assertIn("pylast.Album('Test Artist', 'Test Album',", repr)
|
||||
self.assertIn("pylast.Album('Test Artist', 'Test Album',", rep)
|
||||
self.assertEqual(title, name)
|
||||
self.assertIsInstance(playcount, int)
|
||||
self.assertGreater(playcount, 1)
|
||||
|
@ -195,7 +195,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
|||
|
||||
# Act
|
||||
stringed = str(thing)
|
||||
repr = thing.__repr__()
|
||||
rep = thing.__repr__()
|
||||
title = thing.get_title()
|
||||
name = thing.get_name()
|
||||
playcount = thing.get_playcount()
|
||||
|
@ -203,7 +203,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
|||
|
||||
# Assert
|
||||
self.assertEqual(stringed, "Test Artist - test title")
|
||||
self.assertIn("pylast.Track('Test Artist', 'test title',", repr)
|
||||
self.assertIn("pylast.Track('Test Artist', 'test title',", rep)
|
||||
self.assertEqual(title, "test title")
|
||||
self.assertEqual(title, name)
|
||||
self.assertIsInstance(playcount, int)
|
||||
|
@ -275,6 +275,7 @@ class TestPyLastNetwork(PyLastTestCase):
|
|||
|
||||
def test_init_with_token(self):
|
||||
# Arrange/Act
|
||||
msg = None
|
||||
try:
|
||||
pylast.LastFMNetwork(
|
||||
api_key=self.__class__.secrets["api_key"],
|
||||
|
|
|
@ -239,6 +239,7 @@ class TestPyLastUser(PyLastTestCase):
|
|||
|
||||
def helper_get_assert_charts(self, thing, date):
|
||||
# Arrange
|
||||
album_chart, track_chart = None, None
|
||||
(from_date, to_date) = date
|
||||
|
||||
# Act
|
||||
|
|
Loading…
Reference in a new issue