Add test case for Artist.get_correction()
This commit is contained in:
parent
db9bc4f216
commit
6b58f43c01
|
@ -1908,6 +1908,15 @@ class TestPyLast(unittest.TestCase):
|
||||||
self.assertEqual(str(tracks[0].track.artist), "Johnny Cash")
|
self.assertEqual(str(tracks[0].track.artist), "Johnny Cash")
|
||||||
self.assertEqual(str(tracks[0].track.title), "Ring of Fire")
|
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__':
|
if __name__ == '__main__':
|
||||||
unittest.main(failfast=True)
|
unittest.main(failfast=True)
|
||||||
|
|
Loading…
Reference in a new issue