Exemplo n.º 1
0
 def test_remove_song_working(self):
     album = Album("The Sound of Perseverance")
     song = Song("Scavenger of Human Sorrow", 6.56, False)
     album.add_song(song)
     message = album.remove_song("Scavenger of Human Sorrow")
     expected = "Removed song Scavenger of Human Sorrow from album The Sound of Perseverance."
     self.assertEqual(message, expected)
Exemplo n.º 2
0
 def test_remove_song_album_published(self):
     album = Album("The Sound of Perseverance")
     song = Song("Scavenger of Human Sorrow", 6.56, False)
     album.add_song(song)
     album.publish()
     message = album.remove_song("Scavenger of Human Sorrow")
     expected = "Cannot remove songs. Album is published."
     self.assertEqual(message, expected)
Exemplo n.º 3
0
 def test_remove_song_not_in_album(self):
     album = Album("The Sound of Perseverance")
     song = Song("Scavenger of Human Sorrow", 6.56, False)
     message = album.remove_song("Scavenger of Human Sorrow")
     expected = "Song is not in the album."
     self.assertEqual(message, expected)