fix: ensure referenced testcase share the same session

This commit is contained in:
debugtalk
2020-05-21 15:25:56 +08:00
parent fbc7ad0ae0
commit 28cfb628ad
3 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -68,7 +68,6 @@ class HttpRunner(object):
parsed_request_dict["json"] = parsed_request_dict.pop("req_json", {})
# request
self.__session = self.__session or HttpSession()
resp = self.__session.request(method, url, **parsed_request_dict)
resp_obj = ResponseObject(resp)
@@ -184,6 +183,7 @@ class HttpRunner(object):
parse_config(self.config)
self.__start_at = time.time()
self.__step_datas: List[StepData] = []
self.__session = self.__session or HttpSession()
self.__session_variables = {}
for step in self.teststeps:
# update with config variables