コード例 #1
0
ファイル: test_validators.py プロジェクト: webmaks/aiorest-ws
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)
コード例 #2
0
ファイル: test_validators.py プロジェクト: Gipzo/aiorest-ws
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
        )
コード例 #3
0
ファイル: test_validators.py プロジェクト: webmaks/aiorest-ws
 def setUp(self):
     super(PathValidatorTestCase, self).setUp()
     self.validator = PathValidator()
コード例 #4
0
ファイル: test_validators.py プロジェクト: Gipzo/aiorest-ws
 def setUp(self):
     super(PathValidatorTestCase, self).setUp()
     self.validator = PathValidator()