Ejemplo n.º 1
0
    def test_if_there_are_no_arguments_returns_the_string_representation_of_the_length(
            self):
        song = Song(title="Odin",
                    artist="Manowar",
                    album="The Sons of Odin",
                    length="1:30:44")

        res = song.song_length()

        self.assertEqual(res, "1:30:44")
Ejemplo n.º 2
0
    def test_if_argument_hours_is_true_returns_the_length_in_hours_and_the_length_has_hours(
            self):
        song = Song(title="Odin",
                    artist="Manowar",
                    album="The Sons of Odin",
                    length="1:30:44")

        res = song.song_length(hours=True)

        self.assertEqual(res, 1)