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
f767db09
Commit
f767db09
authored
Mar 25, 2024
by
liguangyu06
Browse files
优化
parent
93c9f9d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_order_handle/验证下单时不传地址信息.air/验证下单时不传地址信息.py
View file @
f767db09
...
...
@@ -37,8 +37,15 @@ result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
result
=
json
.
loads
(
result
.
content
)
# print(result)
result
[
"api_time"
]
=
api_time
if
result
[
"code"
]
==
"3021"
:
if
result
[
"success"
]:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5_2"
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
elif
result
[
"code"
]
==
"3021"
:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5"
)
# print(check_dict)
...
...
data/cmdc_order_handle/data
View file @
f767db09
...
...
@@ -73,7 +73,7 @@ checkDict1: {"productId":"%s"}
#预期结果
checkDict5: {"success":false,"code":"3021","message":"国药集团联合医疗器械有限公司收件人不能为空","data":null,"freshToken":null}
checkDict5_1: {"success":false,"code":"30452","message":"用户证照校验错误"}
checkDict5_2: {"success":true,"code":"200"}
#测试场景六:附件上传接口验证_结算页面
#接口信息
"url6": "/order/mall/demandFileUpload"
...
...
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