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
76bd6082
Commit
76bd6082
authored
Dec 13, 2023
by
liguangyu06
Browse files
用例优化
parent
d42ad665
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_buyercart_handle/购物车支持跨站商品下单验证.air/购物车支持跨站商品下单验证.py
View file @
76bd6082
...
...
@@ -73,10 +73,17 @@ request_body = commonFuc().get_business_data(module, "payload30", buyercart_id_1
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
if
result
[
"data"
]:
# # 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
)
# # 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
# print(result)
if
result
[
"success"
]:
if
result
[
"data"
]:
# # 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
)
# # 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
else
:
print
(
"下单失败"
)
else
:
print
(
"下单失败"
)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2_1"
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
data/cmdc_buyercart_handle/data
View file @
76bd6082
This diff is collapsed.
Click to expand it.
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