create HttpSession as wrapper of requests.Session, in order to log more information of request and response

This commit is contained in:
httprunner
2017-07-03 12:07:40 +08:00
parent 562a028129
commit 9586915322
4 changed files with 187 additions and 4 deletions

View File

@@ -160,7 +160,8 @@ class Context(object):
if "func" in data:
# this is a function, e.g. {"func": "gen_random_string", "args": [5]}
# function marker: "func" key in dict
# the function will be called, and its return value will be binded to the variable.
# the function will be called, and its return value will be binded
# to the testcase context variable.
func_name = data['func']
args = self.get_eval_value(data.get('args', []))
kargs = self.get_eval_value(data.get('kargs', {}))