fix: raise TestCaseFormatError if teststep validate invalid

This commit is contained in:
debugtalk
2020-07-03 20:02:08 +08:00
parent b870227ce3
commit 134f3c6fb3

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: