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
5f0daba1
Commit
5f0daba1
authored
Mar 14, 2024
by
liguangyu06
Browse files
优化
parent
d299025f
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_hospital/医院信息无效_经销商关联医院新增.air/医院信息无效_经销商关联医院新增.py
View file @
5f0daba1
...
...
@@ -28,10 +28,18 @@ request_body = commonFuc().get_business_data(module, "payload7")
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# 过滤掉无效客户
data
=
[]
for
i
in
result
[
"data"
][
"list"
]:
if
i
[
"status"
]
==
3
:
data
.
append
(
i
)
else
:
continue
# print(data)
# 生成随机数
company_ramdom
=
random
.
randint
(
3
,
len
(
result
[
"data"
][
"list"
]
)
-
1
)
company_ramdom
=
random
.
randint
(
0
,
len
(
data
)
-
1
)
# 获取经销商信息
userNo
=
result
[
"data"
][
"list"
]
[
company_ramdom
][
"userNo"
]
userNo
=
data
[
company_ramdom
][
"userNo"
]
# 第三步进行列表条件查询
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url35"
)
...
...
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