mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix #189: remove file path dependency
This commit is contained in:
@@ -80,7 +80,6 @@ class TestRunner(ApiServerUnittest):
|
||||
start_time = time.time()
|
||||
|
||||
config_dict = {
|
||||
"path": os.path.join(os.getcwd(), __file__),
|
||||
"name": "basic test with httpbin",
|
||||
"variables": self.debugtalk_module["variables"],
|
||||
"functions": self.debugtalk_module["functions"],
|
||||
@@ -130,7 +129,6 @@ class TestRunner(ApiServerUnittest):
|
||||
|
||||
def test_run_testset_with_hooks_modify_request(self):
|
||||
config_dict = {
|
||||
"path": os.path.join(os.getcwd(), __file__),
|
||||
"name": "basic test with httpbin",
|
||||
"variables": self.debugtalk_module["variables"],
|
||||
"functions": self.debugtalk_module["functions"],
|
||||
@@ -185,9 +183,7 @@ class TestRunner(ApiServerUnittest):
|
||||
],
|
||||
"teardown_hooks": ["${teardown_hook_sleep_N_secs($response, 2)}"]
|
||||
}
|
||||
config_dict = {
|
||||
"path": os.path.join(os.getcwd(), __file__)
|
||||
}
|
||||
config_dict = {}
|
||||
self.test_runner.init_config(config_dict, "testcase")
|
||||
|
||||
start_time = time.time()
|
||||
@@ -218,9 +214,7 @@ class TestRunner(ApiServerUnittest):
|
||||
],
|
||||
"teardown_hooks": ["${teardown_hook_sleep_N_secs($response, 2)}"]
|
||||
}
|
||||
config_dict = {
|
||||
"path": os.path.join(os.getcwd(), __file__)
|
||||
}
|
||||
config_dict = {}
|
||||
self.test_runner.init_config(config_dict, "testcase")
|
||||
|
||||
start_time = time.time()
|
||||
@@ -246,9 +240,7 @@ class TestRunner(ApiServerUnittest):
|
||||
testcase_file_path = os.path.join(
|
||||
os.getcwd(), 'tests/data/test_bugfix.yml')
|
||||
testcases = loader.load_file(testcase_file_path)
|
||||
config_dict = {
|
||||
"path": testcase_file_path
|
||||
}
|
||||
config_dict = {}
|
||||
self.test_runner.init_config(config_dict, "testcase")
|
||||
|
||||
test = testcases[2]["test"]
|
||||
|
||||
Reference in New Issue
Block a user