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
a3e07a31
Commit
a3e07a31
authored
Dec 08, 2023
by
liguangyu06
Browse files
用例优化
parent
ceb7d33b
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_rebate/a_返利规则新增验证.air/a_返利规则新增验证.py
View file @
a3e07a31
...
...
@@ -64,8 +64,14 @@ request_body = commonFuc().get_business_data(module, "payload21", customer_name,
# 发送请求
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
print
(
result
)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict21"
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
# print(result)
if
result
[
"success"
]:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict21"
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
else
:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict22"
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
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