Added test to track.get_similar() with limit paramater
This commit is contained in:
parent
964d1dc5c7
commit
a469f5b4e2
|
@ -160,6 +160,15 @@ class TestPyLastTrack(PyLastTestCase):
|
||||||
break
|
break
|
||||||
self.assertTrue(found)
|
self.assertTrue(found)
|
||||||
|
|
||||||
|
def test_track_get_similar_with_limit(self):
|
||||||
|
# Arrange
|
||||||
|
track = pylast.Track("Cher", "Believe", self.network)
|
||||||
|
|
||||||
|
# Act
|
||||||
|
similar = track.get_similar(limit=5)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
self.assertEqual(len(similar),5)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main(failfast=True)
|
unittest.main(failfast=True)
|
||||||
|
|
Loading…
Reference in a new issue