mirror of
https://github.com/httprunner/httprunner.git
synced 2026-08-21 16:22:17 +08:00
fix: missing validate_script
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# NOTICE: Generated By HttpRunner. DO NOT EDIT!
|
# NOTICE: Generated By HttpRunner. DO NOT EDIT!
|
||||||
# FROM: examples/httpbin/validate.yml
|
# FROM: examples/httpbin/validate.yml
|
||||||
|
|
||||||
from httprunner import HttpRunner, TConfig, TStep
|
from httprunner import HttpRunner, TConfig, TStep
|
||||||
|
|
||||||
|
|
||||||
@@ -9,6 +10,7 @@ class TestCaseValidate(HttpRunner):
|
|||||||
"name": "basic test with httpbin",
|
"name": "basic test with httpbin",
|
||||||
"base_url": "http://httpbin.org/",
|
"base_url": "http://httpbin.org/",
|
||||||
"path": "examples/httpbin/validate_test.py",
|
"path": "examples/httpbin/validate_test.py",
|
||||||
|
"variables": {},
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ def sort_step_by_custom_order(step: Dict) -> Dict:
|
|||||||
"teardown_hooks",
|
"teardown_hooks",
|
||||||
"extract",
|
"extract",
|
||||||
"validate",
|
"validate",
|
||||||
|
"validate_script",
|
||||||
]
|
]
|
||||||
return sort_dict_by_custom_order(step, custom_order)
|
return sort_dict_by_custom_order(step, custom_order)
|
||||||
|
|
||||||
@@ -137,6 +138,9 @@ def ensure_step_attachment(step: Dict) -> Dict:
|
|||||||
if "validate" in step:
|
if "validate" in step:
|
||||||
test_dict["validate"] = convert_validators(step["validate"])
|
test_dict["validate"] = convert_validators(step["validate"])
|
||||||
|
|
||||||
|
if "validate_script" in step:
|
||||||
|
test_dict["validate_script"] = step["validate_script"]
|
||||||
|
|
||||||
return test_dict
|
return test_dict
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ class TStep(BaseModel):
|
|||||||
teardown_hooks: Hook = []
|
teardown_hooks: Hook = []
|
||||||
extract: Dict[Text, Text] = {}
|
extract: Dict[Text, Text] = {}
|
||||||
validators: Validators = Field([], alias="validate")
|
validators: Validators = Field([], alias="validate")
|
||||||
|
validate_script: List[Text] = []
|
||||||
|
|
||||||
|
|
||||||
class TestCase(BaseModel):
|
class TestCase(BaseModel):
|
||||||
|
|||||||
Reference in New Issue
Block a user