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
e643b7ba
Commit
e643b7ba
authored
Feb 02, 2024
by
liguangyu06
Browse files
优化
parent
0151fe70
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_order_merge/获取电商配货详情.air/获取电商配货详情.py
View file @
e643b7ba
...
@@ -48,12 +48,19 @@ result = requests.get(url, params=request_body, headers=headers)
...
@@ -48,12 +48,19 @@ result = requests.get(url, params=request_body, headers=headers)
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
api_time
=
float
(
result
.
elapsed
.
total_seconds
())
result
=
json
.
loads
(
result
.
content
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
# print(result)
# 获取详情页中distributionId
if
result
[
"success"
]:
result
=
{
"distributionId"
:
result
[
"data"
][
"distributionId"
]}
# 获取详情页中distributionId
result
[
"api_time"
]
=
api_time
result
=
{
"distributionId"
:
result
[
"data"
][
"distributionId"
]}
result
[
"api_time"
]
=
api_time
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5"
,
distri_bution_id
)
# 获取预期结果
# print(check_dict)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5"
,
distri_bution_id
)
# 断言实际结果中是否包含预期结果的内容
# print(check_dict)
commonFuc
().
check_result
(
check_dict
,
result
)
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
else
:
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict5"
,
distri_bution_id
)
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
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