def test_playlist_validate_name_raises_exception_if_name_not_str(self): test = 5 exc = None try: Playlist.validate_name(test) except Exception as err: exc = err self.assertIsNotNone(exc) self.assertEqual(str(exc), 'Name must be of "str" type.')
def test_playlist_validate_name_raises_exception_if_name_is_empty_str( self): test = '' exc = None try: Playlist.validate_name(test) except Exception as err: exc = err self.assertIsNotNone(exc) self.assertEqual(str(exc), 'Empty string cannot be a name.')
def test_playlist_validate_name_passes_with_correct_input(self): test = 'code' Playlist.validate_name(test)