mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-06 23:11:21 +08:00
deprecate requires
This commit is contained in:
@@ -11,20 +11,6 @@ bind_lambda_functions:
|
||||
- add1: ${add_one(2)}
|
||||
- sum2nums: ${add_two_nums(2, 3)}
|
||||
|
||||
bind_lambda_functions_with_import:
|
||||
requires:
|
||||
- random
|
||||
- string
|
||||
- hashlib
|
||||
function_binds:
|
||||
gen_random_string: "lambda str_len: ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(str_len))"
|
||||
gen_md5: "lambda *str_args: hashlib.md5(''.join(str_args).encode('utf-8')).hexdigest()"
|
||||
variables:
|
||||
- TOKEN: debugtalk
|
||||
- random: ${gen_random_string(5)}
|
||||
- data: "{'name': 'user', 'password': '123456'}"
|
||||
- authorization: ${gen_md5($TOKEN, $data, $random)}
|
||||
|
||||
builtin_functions:
|
||||
variables:
|
||||
- length: ${len(debugtalk)}
|
||||
|
||||
Reference in New Issue
Block a user