From 6b58f43c01599c65e81ddb0d910179689662a2a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Neto?= Date: Wed, 1 Jul 2015 17:04:01 -0300 Subject: [PATCH] Add test case for Artist.get_correction() --- tests/test_pylast.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/test_pylast.py b/tests/test_pylast.py index 1980e7a..c388ef9 100755 --- a/tests/test_pylast.py +++ b/tests/test_pylast.py @@ -1907,7 +1907,16 @@ class TestPyLast(unittest.TestCase): self.assertEqual(len(tracks), 1) self.assertEqual(str(tracks[0].track.artist), "Johnny Cash") self.assertEqual(str(tracks[0].track.title), "Ring of Fire") - + + def test_artist_get_correction(self): + # Arrange + artist = pylast.Artist("guns and roses", self.network) + + # Act + corrected_artist_name = artist.get_correction() + + # Assert + self.assertEqual(corrected_artist_name, "Guns N' Roses") if __name__ == '__main__': unittest.main(failfast=True)