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
698bd78b
Commit
698bd78b
authored
Jan 11, 2024
by
liguangyu06
Browse files
优化
parent
b6cc4400
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_demand_mall/解除订单占用功能验证.air/解除订单占用功能验证.py
View file @
698bd78b
...
...
@@ -24,10 +24,11 @@ headers = commonFuc().get_business_data(module, "json_headers1", cmdc_access_tok
# 第二步获取需求单列表
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url1"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload1"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload
_
1"
)
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 生成随机数
random_demand
=
random
.
randint
(
0
,
len
(
result
[
"data"
][
"list"
])
-
1
)
...
...
@@ -35,7 +36,6 @@ random_demand = random.randint(0, len(result["data"]["list"]) - 1)
demand_id
=
result
[
"data"
][
"list"
][
random_demand
][
"demandId"
]
# demand_id = "40187"
# 第三步解除订单占用
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url24"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload24"
,
demand_id
)
...
...
data/cmdc_demand_mall/data
View file @
698bd78b
...
...
@@ -27,6 +27,7 @@ json_headers1: {
#测试场景一:需求单列表获取接口验证
"url1": "/order/public/ownListDemand"
"payload1": {"sellerCompanyCodes":[],"materialCode":"","productCode":"","productInfoValue":"","manufacturerList":null,"orderNum":"","paymentType":null,"preferenceType":null,"changeSign":null,"mainOrderStatus":null,"shipmentType":null,"pageStart":5,"pageSize":10}
"payload_1": {"sellerCompanyCodes":[],"materialCode":"","productCode":"","productInfoValue":"","manufacturerList":null,"orderNum":"","paymentType":null,"preferenceType":null,"changeSign":null,"mainOrderStatus":2,"shipmentType":null,"pageStart":1,"pageSize":10}
#预期结果
checkDict1: {"success":true,"code":"200","message":"OK"}
...
...
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