mirror of
https://github.com/correl/openapi-core.git
synced 2025-01-04 03:00:15 +00:00
TestPathItemParamsValidator linting fix
This commit is contained in:
parent
27ebae3182
commit
e8d98dfdf7
1 changed files with 8 additions and 2 deletions
|
@ -283,7 +283,10 @@ class TestPathItemParamsValidator(object):
|
||||||
assert result.parameters == {}
|
assert result.parameters == {}
|
||||||
|
|
||||||
def test_request_invalid_param(self, validator):
|
def test_request_invalid_param(self, validator):
|
||||||
request = MockRequest('http://example.com', 'get', '/resource', args={'resId': 'invalid'})
|
request = MockRequest(
|
||||||
|
'http://example.com', 'get', '/resource',
|
||||||
|
args={'resId': 'invalid'},
|
||||||
|
)
|
||||||
result = validator.validate(request)
|
result = validator.validate(request)
|
||||||
|
|
||||||
assert len(result.errors) == 1
|
assert len(result.errors) == 1
|
||||||
|
@ -292,7 +295,10 @@ class TestPathItemParamsValidator(object):
|
||||||
assert result.parameters == {}
|
assert result.parameters == {}
|
||||||
|
|
||||||
def test_request_valid_param(self, validator):
|
def test_request_valid_param(self, validator):
|
||||||
request = MockRequest('http://example.com', 'get', '/resource', args={'resId': '10'})
|
request = MockRequest(
|
||||||
|
'http://example.com', 'get', '/resource',
|
||||||
|
args={'resId': '10'},
|
||||||
|
)
|
||||||
result = validator.validate(request)
|
result = validator.validate(request)
|
||||||
|
|
||||||
assert len(result.errors) == 0
|
assert len(result.errors) == 0
|
||||||
|
|
Loading…
Reference in a new issue