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
407d0027
Commit
407d0027
authored
Dec 13, 2023
by
liguangyu06
Browse files
用例优化
parent
619ba53f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_order_handle/验证下单时不传地址信息.air/验证下单时不传地址信息.py
View file @
407d0027
...
...
@@ -36,8 +36,15 @@ request_body = commonFuc().get_business_data(module, "payload5")
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5"
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
if
result
[
"code"
]
==
"3021"
:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5"
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
else
:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5_1"
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
data/cmdc_order_handle/data
View file @
407d0027
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