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
64eaa986
Commit
64eaa986
authored
Mar 25, 2024
by
liguangyu06
Browse files
优化
parent
eb9bde79
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_31st/查询条件验证_变更审核列表.air/查询条件验证_变更审核列表.py
View file @
64eaa986
...
...
@@ -31,10 +31,11 @@ result = json.loads(result.content)
# 生成随机数
site_random
=
random
.
randint
(
0
,
len
(
result
[
"data"
][
"list"
])
-
1
)
# site_random = 0
# 获取站点信息
apply_no
=
result
[
"data"
][
"list"
][
site_random
][
"applyNo"
]
apply_time
=
result
[
"data"
][
"list"
][
site_random
][
"createTime"
][:
10
]
+
" 00:00:00"
now_time
=
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d
00:00:00
"
)
now_time
=
datetime
.
datetime
.
now
().
strftime
(
"%Y-%m-%d
23:59:59
"
)
company_name
=
result
[
"data"
][
"list"
][
site_random
][
"companyName"
]
apply_status
=
result
[
"data"
][
"list"
][
site_random
][
"applyStatus"
]
site_type
=
result
[
"data"
][
"list"
][
site_random
][
"siteType"
]
...
...
@@ -43,7 +44,7 @@ site_type = result["data"]["list"][site_random]["siteType"]
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url6"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload6"
,
apply_no
,
company_name
,
apply_time
,
now_time
,
apply_status
,
site_type
)
# print(request_body)
"""
场景: 查询条件验证_变更审核列表
...
...
@@ -58,7 +59,7 @@ api_time = float(result.elapsed.total_seconds())
# 获取查询结果中applyNo
result
=
json
.
loads
(
result
.
content
)
#
print(result)
print
(
result
)
result
=
{
"applyNo"
:
result
[
"data"
][
"list"
][
0
][
"applyNo"
]}
# 将接口响应时间添加至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