bugfix: make compatible with testcase name is empty

This commit is contained in:
debugtalk
2019-01-16 17:47:44 +08:00
parent 17138dff98
commit 7b6922817c
2 changed files with 5 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
__title__ = 'HttpRunner'
__description__ = 'One-stop solution for HTTP(S) testing.'
__url__ = 'https://github.com/HttpRunner/HttpRunner'
__version__ = '2.0.0'
__version__ = '2.0.1'
__author__ = 'debugtalk'
__author_email__ = 'mail@debugtalk.com'
__license__ = 'Apache-2.0'

View File

@@ -733,8 +733,12 @@ def _extend_with_testcase(test_dict, testcase_def_dict):
test_verify = test_dict.pop("verify", True)
testcase_def_dict["config"].setdefault("verify", test_verify)
# override name
test_name = test_dict.pop("name") or testcase_def_dict["config"].pop("name") or "Undefined name"
# override testcase config name, output, etc.
testcase_def_dict["config"].update(test_dict)
testcase_def_dict["config"]["name"] = test_name
test_dict.clear()
test_dict.update(testcase_def_dict)