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
4e41496c
Commit
4e41496c
authored
Sep 25, 2023
by
liguangyu06
Browse files
优化用例
parent
01f3c9e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_demand_delete/重复删除需求单.air/重复删除需求单.py
View file @
4e41496c
...
@@ -29,8 +29,10 @@ request_body = commonFuc().get_business_data(module, "payload10")
...
@@ -29,8 +29,10 @@ request_body = commonFuc().get_business_data(module, "payload10")
# 发送请求
# 发送请求
result
=
requests
.
post
(
url1
,
json
=
request_body
,
headers
=
headers
)
result
=
requests
.
post
(
url1
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
result
=
json
.
loads
(
result
.
content
)
print
(
result
)
# 获取demandId
# 获取demandId
demand_id
=
result
[
"data"
][
"list"
][
0
][
"demandId"
]
demand_id
=
result
[
"data"
][
"list"
][
0
][
"demandId"
]
print
(
demand_id
)
# 第三步删除操作
# 第三步删除操作
url2
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url"
)
url2
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url"
)
request_body2
=
commonFuc
().
get_business_data
(
module
,
"payload1"
,
demand_id
)
request_body2
=
commonFuc
().
get_business_data
(
module
,
"payload1"
,
demand_id
)
...
@@ -39,12 +41,14 @@ result2 = requests.post(url2, json=request_body2, headers=headers)
...
@@ -39,12 +41,14 @@ result2 = requests.post(url2, json=request_body2, headers=headers)
# 第四步重复进行删除操作
# 第四步重复进行删除操作
url3
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url"
)
url3
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url"
)
request_body3
=
commonFuc
().
get_business_data
(
module
,
"payload3"
)
print
(
url3
)
request_body3
=
commonFuc
().
get_business_data
(
module
,
"payload3"
,
demand_id
)
print
(
request_body3
)
"""
"""
场景:重复删除需求单
场景:重复删除需求单
用例名称:重复删除需求单
用例名称:重复删除需求单
输出:{"success":false,"code":"demand","message":"订单已
拒绝,无法重复拒绝
","data":null,"freshToken":null}
输出:{"success":false,"code":"demand","message":"
该
订单已
提交过,请稍后操作
","data":null,"freshToken":null}
"""
"""
# 发送请求
# 发送请求
...
...
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