refactor loader: load testcases

This commit is contained in:
httprunner
2018-08-12 01:25:28 +08:00
parent e02aefa122
commit b665ad79ef
8 changed files with 355 additions and 374 deletions

View File

@@ -170,7 +170,7 @@ class TestRunner(ApiServerUnittest):
"config": {
'path': 'tests/httpbin/hooks.yml',
},
"testcases": [
"teststeps": [
{
"name": "test teardown hooks",
"request": {
@@ -206,7 +206,7 @@ class TestRunner(ApiServerUnittest):
"config": {
'path': 'tests/httpbin/hooks.yml',
},
"testcases": [
"teststeps": [
{
"name": "test teardown hooks",
"request": {
@@ -236,7 +236,7 @@ class TestRunner(ApiServerUnittest):
"config": {
'path': 'tests/httpbin/hooks.yml',
},
"testcases": [
"teststeps": [
{
"name": "test teardown hooks",
"request": {
@@ -384,7 +384,7 @@ class TestRunner(ApiServerUnittest):
testsets = loader.load_testcases(testcase_file_path)
testset = testsets[0]
config_dict_headers = testset["config"]["request"]["headers"]
test_dict_headers = testset["testcases"][0]["request"]["headers"]
test_dict_headers = testset["teststeps"][0]["request"]["headers"]
headers = deep_update_dict(
config_dict_headers,
test_dict_headers