mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +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"]
|
||||
|
||||
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"])
|
||||
|
||||
if "validate_script" in step:
|
||||
|
||||
Reference in New Issue
Block a user