mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-30 21:09:36 +08:00
bugfix verify priority: teststep > config
This commit is contained in:
@@ -794,9 +794,12 @@ def __parse_testcase_tests(tests, config, project_mapping):
|
||||
variables priority:
|
||||
testcase config > testcase test > testcase_def config > testcase_def test > api
|
||||
|
||||
base_url/verify priority:
|
||||
base_url priority:
|
||||
testcase test > testcase config > testsuite test > testsuite config > api
|
||||
|
||||
verify priority:
|
||||
testcase teststep (api) > testcase config > testsuite config
|
||||
|
||||
Args:
|
||||
tests (list):
|
||||
config (dict):
|
||||
@@ -814,8 +817,6 @@ def __parse_testcase_tests(tests, config, project_mapping):
|
||||
if (not test_dict.get("base_url")) and config_base_url:
|
||||
test_dict["base_url"] = config_base_url
|
||||
|
||||
test_dict.setdefault("verify", config_verify)
|
||||
|
||||
# 1, testcase config => testcase tests
|
||||
# override test_dict variables
|
||||
test_dict["variables"] = utils.extend_variables(
|
||||
@@ -875,6 +876,10 @@ def __parse_testcase_tests(tests, config, project_mapping):
|
||||
request_url
|
||||
)
|
||||
|
||||
# verify priority: testcase teststep > testcase config
|
||||
if "request" in test_dict and "verify" not in test_dict["request"]:
|
||||
test_dict["request"]["verify"] = config_verify
|
||||
|
||||
|
||||
def _parse_testcase(testcase, project_mapping):
|
||||
""" parse testcase
|
||||
|
||||
Reference in New Issue
Block a user