rename keyword: variable_binds => variables

This commit is contained in:
debugtalk
2017-10-24 15:59:09 +08:00
parent 7b64b8233b
commit 388a6da23a
14 changed files with 74 additions and 73 deletions

View File

@@ -1,5 +1,5 @@
bind_variables:
variable_binds:
variables:
- TOKEN: "debugtalk"
- token: $TOKEN
@@ -7,7 +7,7 @@ bind_lambda_functions:
function_binds:
add_one: "lambda x: x + 1"
add_two_nums: "lambda x, y: x + y"
variable_binds:
variables:
- add1: ${add_one(2)}
- sum2nums: ${add_two_nums(2, 3)}
@@ -19,7 +19,7 @@ bind_lambda_functions_with_import:
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()"
variable_binds:
variables:
- TOKEN: debugtalk
- random: ${gen_random_string(5)}
- data: "{'name': 'user', 'password': '123456'}"
@@ -29,7 +29,7 @@ bind_module_functions:
function_binds:
import_module_items:
- tests.data.debugtalk
variable_binds:
variables:
- TOKEN: debugtalk
- random: ${gen_random_string(5)}
- data: "{'name': 'user', 'password': '123456'}"

View File

@@ -1,6 +1,6 @@
- config:
name: "user management testset."
variable_binds:
variables:
- user_agent: 'iOS/10.3'
- device_sn: ${gen_random_string(15)}
- os_platform: 'ios'
@@ -35,7 +35,7 @@
- test:
name: create user which does not exist
variable_binds:
variables:
- user_name: "user1"
- user_password: "123456"
api: create_user(1000, $user_name, $user_password, $token)
@@ -53,7 +53,7 @@
- test:
name: create user which exists
variable_binds:
variables:
- user_name: "user1"
- user_password: "123456"
api: create_user(1000, $user_name, $user_password, $token)
@@ -63,7 +63,7 @@
- test:
name: update user which exists
variable_binds:
variables:
- user_name: "user1"
- user_password: "654321"
api: update_user(1000, $user_name, $user_password, $token)
@@ -102,7 +102,7 @@
- test:
name: create user which has been deleted
variable_binds:
variables:
- user_name: "user1"
- user_password: "123456"
api: create_user(1000, $user_name, $user_password, $token)

View File

@@ -2,7 +2,7 @@
name: "create user testsets."
import_module_items:
- tests.data.debugtalk
variable_binds:
variables:
- user_agent: 'iOS/10.3'
- device_sn: ${gen_random_string(15)}
- os_platform: 'ios'
@@ -33,7 +33,7 @@
- test:
name: create user which does not exist
variable_binds:
variables:
- user_name: "user1"
- user_password: "123456"
request:

View File

@@ -12,7 +12,7 @@
'DebugTalk'.encode('ascii'),
''.join(args).encode('ascii'),
hashlib.sha1).hexdigest()"
variable_binds:
variables:
- user_agent: 'iOS/10.3'
- device_sn: ${gen_random_string_lambda(15)}
- os_platform: 'ios'
@@ -43,7 +43,7 @@
- test:
name: create user which does not exist
variable_binds:
variables:
- user_name: "user1"
- user_password: "123456"
request:

View File

@@ -1,6 +1,6 @@
- config:
name: "create user testsets."
variable_binds:
variables:
- device_sn: 'HZfFBh6tU59EdXJ'
request:
base_url: $BASE_URL
@@ -10,7 +10,7 @@
- test:
name: get token
variable_binds:
variables:
- user_agent: 'iOS/10.3'
- os_platform: 'ios'
- app_version: '2.8.6'
@@ -34,7 +34,7 @@
- test:
name: create user which does not exist
variable_binds:
variables:
- user_name: "user1"
- user_password: "123456"
request: