Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
602ed6bd
Commit
602ed6bd
authored
1 year ago
by
liguangyu06
Browse files
Options
Download
Email Patches
Plain Diff
优化
parent
3c768ecc
main
master
1 merge request
!6
Master|代码更新归档
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
air_case/cmdc_demand_create_pc/多采商城需求单创建.air/多采商城需求单创建.py
+3
-1
air_case/cmdc_demand_create_pc/多采商城需求单创建.air/多采商城需求单创建.py
air_case/cmdc_demand_create_pc/多采商城需求单草稿创建.air/多采商城需求单草稿创建.py
+1
-1
...case/cmdc_demand_create_pc/多采商城需求单草稿创建.air/多采商城需求单草稿创建.py
with
4 additions
and
2 deletions
+4
-2
air_case/cmdc_demand_create_pc/多采商城需求单创建.air/多采商城需求单创建.py
+
3
-
1
View file @
602ed6bd
...
@@ -34,6 +34,7 @@ result = requests.post(url, json=request_body, headers=headers)
...
@@ -34,6 +34,7 @@ result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
# 获取接口响应时间
api_time
=
result
.
elapsed
.
total_seconds
()
api_time
=
result
.
elapsed
.
total_seconds
()
result
=
json
.
loads
(
result
.
content
)
result
=
json
.
loads
(
result
.
content
)
# print(result)
result
[
"api_time"
]
=
api_time
result
[
"api_time"
]
=
api_time
# print(result)
# print(result)
if
result
[
"success"
]:
if
result
[
"success"
]:
...
@@ -45,6 +46,6 @@ if result["success"]:
...
@@ -45,6 +46,6 @@ if result["success"]:
else
:
else
:
# 获取预期结果
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict_1"
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict_1"
)
print
(
check_dict
)
#
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
commonFuc
().
check_result
(
check_dict
,
result
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
air_case/cmdc_demand_create_pc/多采商城需求单草稿创建.air/多采商城需求单草稿创建.py
+
1
-
1
View file @
602ed6bd
...
@@ -38,6 +38,6 @@ result = json.loads(result.content)
...
@@ -38,6 +38,6 @@ result = json.loads(result.content)
result
[
"api_time"
]
=
api_time
result
[
"api_time"
]
=
api_time
# 获取预期结果
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
)
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict2"
)
print
(
check_dict
)
#
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
# 断言实际结果中是否包含预期结果的内容
commonFuc
().
check_result
(
check_dict
,
result
)
commonFuc
().
check_result
(
check_dict
,
result
)
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
Menu
Explore
Projects
Groups
Snippets