Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-cmdc
Commits
e138b8a6
Commit
e138b8a6
authored
Feb 05, 2024
by
liguangyu06
Browse files
优化
parent
3302db10
Changes
6
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_rebate/商品黑名单批量导入_返利规则_商品与产品线不匹配.air/商品黑名单批量导入_返利规则_商品与产品线不匹配.py
View file @
e138b8a6
...
...
@@ -18,8 +18,8 @@ module = "cmdc_rebate"
# 第一步登录后台运营平台获取cmdc_access_token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers_file"
,
cmdc_access_token
)
...
...
air_case/cmdc_rebate/商品黑名单批量导入验证_返利规则.air/商品黑名单批量导入验证_返利规则.py
View file @
e138b8a6
...
...
@@ -18,8 +18,8 @@ module = "cmdc_rebate"
# 第一步登录后台运营平台获取cmdc_access_token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers_file"
,
cmdc_access_token
)
...
...
@@ -36,7 +36,7 @@ result = requests.post(url, headers=headers, json=request_body)
result
=
json
.
loads
(
result
.
content
)
# 生成随机数
product_random
=
random
.
randint
(
1
,
len
(
result
[
"data"
][
"list"
])
-
1
)
product_random
=
random
.
randint
(
0
,
len
(
result
[
"data"
][
"list"
])
-
1
)
# 获取商品code
product_code
=
result
[
"data"
][
"list"
][
product_random
][
"relevanceCode"
]
...
...
air_case/cmdc_rebate/审核拒绝验证_返利审核.air/审核拒绝验证_返利审核.py
View file @
e138b8a6
...
...
@@ -16,8 +16,8 @@ module = "cmdc_rebate"
# 第一步登录后台运营平台获取cmdc_access_token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
...
...
air_case/cmdc_rebate/审核通过验证_返利审核.air/审核通过验证_返利审核.py
View file @
e138b8a6
...
...
@@ -16,8 +16,8 @@ module = "cmdc_rebate"
# 第一步登录后台运营平台获取cmdc_access_token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
...
...
air_case/cmdc_rebate/批量导入商品_返利发放管理.air/批量导入商品_返利发放管理.py
View file @
e138b8a6
...
...
@@ -18,8 +18,8 @@ module = "cmdc_rebate"
# 第一步登录后台运营平台获取cmdc_access_token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers_file"
,
cmdc_access_token
)
...
...
data/cmdc_rebate/data
View file @
e138b8a6
...
...
@@ -160,10 +160,10 @@ checkDict18: {"success":true}
#测试场景二十:商品黑名单批量导入验证_返利规则
"url19": "/product/uploadProductExcel"
"payload19": {"relevanceCode":
3111
}
"payload19": {"relevanceCode":
10052433
}
#获取商品信息
"url_product": "/product/queryProductForControlSalesByPage"
"payload_product": {"productName":"","productCode":"","relevanceCode":"
3111
","pageNum":1,"pageSize":10,"pageTotal":0}
"payload_product": {"productName":"","productCode":"","relevanceCode":"
10052433
","pageNum":1,"pageSize":10,"pageTotal":0}
#预期结果
checkDict19: {"success":true}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment