support both "validate" and "validators"

This commit is contained in:
debugtalk
2019-04-11 12:30:03 +08:00
parent e58e87befe
commit 75aa036548
2 changed files with 5 additions and 5 deletions

View File

@@ -267,7 +267,7 @@ class Runner(object):
self.session_context.update_session_variables(extracted_variables_mapping)
# validate
validators = test_dict.get("validate", [])
validators = test_dict.get("validate") or test_dict.get("validators") or []
try:
self.session_context.validate(validators, resp_obj)
except (exceptions.ParamsError, exceptions.ValidationFailure, exceptions.ExtractFailure):