From 3a0e69f218ea246558d75baaffedc71adb9d3242 Mon Sep 17 00:00:00 2001 From: hugovk Date: Mon, 3 Mar 2014 12:16:22 +0200 Subject: [PATCH] Add test case for #70: username parameter already supported for track.getInfo to get user's play count --- test_pylast.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test_pylast.py b/test_pylast.py index bcc351b..397620e 100755 --- a/test_pylast.py +++ b/test_pylast.py @@ -484,6 +484,20 @@ class TestPyLast(unittest.TestCase): # Assert self.assertGreaterEqual(int(total), 0) + + def test_user_play_count_in_track_info(self): + # Arrange + artist = "Test Artist" + title = "Test Title" + track = pylast.Track(artist = artist, title = title, network = self.network, username = self.username) + + # Act + count = track.get_userplaycount() + + # Assert + self.assertGreaterEqual(count, 0) + + if __name__ == '__main__': # For quick testing of a single case (eg. test = "test_scrobble")