def test_song_validate_argument_raises_exception_if_argument_type_not_str( self): test = 5 exc = None try: Song.validate_argument(test) except Exception as err: exc = err self.assertIsNotNone(exc) self.assertEqual(str(exc), 'All arguments must be of "str" type.')
def test_song_validate_argument_raises_exception_if_argument_is_empty_string( self): test = '' exc = None try: Song.validate_argument(test) except Exception as err: exc = err self.assertIsNotNone(exc) self.assertEqual(str(exc), 'Empty string cannot be an argument.')
def test_song_validate_argument_passes_with_correct_input(self): test = 'Test' Song.validate_argument(test)