fix: raise TestCaseFormatError if teststep validate invalid

This commit is contained in:
debugtalk
2020-07-06 10:50:49 +08:00
parent d53f65b76d
commit ee67e2b72c
+4
View File
@@ -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: