class PathValidatorTestCase(unittest.TestCase): def setUp(self): super(PathValidatorTestCase, self).setUp() self.validator = PathValidator() def test_check_path(self): valid_path = '/api' self.assertIsNone(self.validator.validate(valid_path)) def test_check_path_failed(self): invalid_path = 'api' self.assertRaises(InvalidPathArgument, self.validator.validate, invalid_path)
class PathValidatorTestCase(unittest.TestCase): def setUp(self): super(PathValidatorTestCase, self).setUp() self.validator = PathValidator() def test_check_path(self): valid_path = '/api' self.assertIsNone(self.validator.validate(valid_path)) def test_check_path_failed(self): invalid_path = 'api' self.assertRaises( InvalidPathArgument, self.validator.validate, invalid_path )
def setUp(self): super(PathValidatorTestCase, self).setUp() self.validator = PathValidator()