Closed
Description
==================================================== FAILURES ====================================================
___________________ TestSpecValidatorIterErrors.test_parameter_custom_format_checker_not_found ___________________
self = <test_exceptions.TestSpecValidatorIterErrors object at 0x7f950b421d90>
validator_v30 = <Proxy at 0x7f950b6cf540 wrapping <openapi_spec_validator.validation.validators.SpecValidator object at 0x7f950bbdd190...bHandler object at 0x7f950bae7910>, 'file': <jsonschema_spec.handlers.urllib.UrllibHandler object at 0x7f950bae7890>})>
def test_parameter_custom_format_checker_not_found(self, validator_v30):
spec = {
"openapi": "3.0.0",
"info": {
"title": "Test Api",
"version": "0.0.1",
},
"paths": {
"/test/": {
"get": {
"responses": {
"default": {
"description": "default response",
},
},
"parameters": [
{
"name": "param1",
"in": "query",
"schema": {
"type": "string",
"format": "custom",
"default": "customvalue",
},
},
],
},
},
},
}
errors = validator_v30.iter_errors(spec)
errors_list = list(errors)
> assert len(errors_list) == 1
E assert 0 == 1
E + where 0 = len([])
errors = <generator object SpecValidator.iter_errors at 0x7f950b52b040>
errors_list = []
self = <test_exceptions.TestSpecValidatorIterErrors object at 0x7f950b421d90>
spec = {'info': {'title': 'Test Api', 'version': '0.0.1'}, 'openapi': '3.0.0', 'paths': {'/test/': {'get': {'parameters': [{'in': 'query', 'name': 'param1', 'schema': {...}}], 'responses': {'default': {'description': 'default response'}}}}}}
validator_v30 = <Proxy at 0x7f950b6cf540 wrapping <openapi_spec_validator.validation.validators.SpecValidator object at 0x7f950bbdd190...bHandler object at 0x7f950bae7910>, 'file': <jsonschema_spec.handlers.urllib.UrllibHandler object at 0x7f950bae7890>})>
tests/integration/validation/test_exceptions.py:457: AssertionError
Metadata
Metadata
Assignees
Labels
No labels