mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 23:41:22 +08:00
fix: raise TestCaseFormatError if teststep validate invalid
This commit is contained in:
@@ -182,6 +182,10 @@ def _ensure_step_attachment(step: Dict) -> Dict:
|
|||||||
test_dict["export"] = step["export"]
|
test_dict["export"] = step["export"]
|
||||||
|
|
||||||
if "validate" in step:
|
if "validate" in step:
|
||||||
|
if not isinstance(step["validate"], List):
|
||||||
|
raise exceptions.TestCaseFormatError(
|
||||||
|
f'Invalid teststep validate: {step["validate"]}'
|
||||||
|
)
|
||||||
test_dict["validate"] = _convert_validators(step["validate"])
|
test_dict["validate"] = _convert_validators(step["validate"])
|
||||||
|
|
||||||
if "validate_script" in step:
|
if "validate_script" in step:
|
||||||
|
|||||||
Reference in New Issue
Block a user