Beispiel #1
0
 def test_validation_when_title_is_not_str_then_raise_type_error(self):
     with self.assertRaises(TypeError):
         Song.validate_parameters(title=1, artist='OneRepublic', album='Native', length='3:44')
Beispiel #2
0
 def test_validation_when_artist_is_not_str_then_raise_type_error(self):
     with self.assertRaises(TypeError):
         Song.validate_parameters(title='Love Runs Out', artist=1, album='Native', length='3:44')
Beispiel #3
0
 def test_validation_when_length_is_not_in_hh_mm_ss_format_then_return_value_error(self):
     with self.assertRaises(ValueError):
         Song.validate_parameters(title='Love Runs Out', artist='OneRepublic', album='Native', length='3-44')