svanoort / pyresttest

Python Rest Testing
Apache License 2.0
1.15k stars 325 forks source link

json_schema is not a named validator type #199

Closed rsukla-handy closed 8 years ago

rsukla-handy commented 8 years ago

I am trying to follow the test example from here to validate my schema. But I am getting an error

"Name {0} is not a named validator type!".format(name)) ValueError: Name json_schema is not a named validator type!

So I looked up the validators.py file but I couldn't find anything for json_schema ? Could you tell me how we can do the schema tests??

Where is the code for json_schema ? the below code is from validators.py file

register_extractor('jsonpath_mini', MiniJsonExtractor.parse)
register_extractor('header', HeaderExtractor.parse)
register_extractor('raw_body', RawBodyExtractor.parse)
register_validator('comparator', ComparatorValidator.parse)
register_validator('compare', ComparatorValidator.parse)
register_validator('assertEqual', ComparatorValidator.parse)
register_validator('extract_test', ExtractTestValidator.parse)
register_validator('assertTrue', ExtractTestValidator.parse)```
svanoort commented 8 years ago

Hi @rsukla-handy - do you have the jsonschema library installed and available to python, per the docs ?

rsukla-handy commented 8 years ago

please close it, the issue is resolved.