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
bbc40716
Commit
bbc40716
authored
Mar 05, 2024
by
liguangyu06
Browse files
优化
parent
bff3319e
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_order_handle/规格型号模糊查询验证_结算页面.air/规格型号模糊查询验证_结算页面.py
View file @
bbc40716
...
...
@@ -23,7 +23,8 @@ cmdc_access_token = CmdcMaiiLogin(username, password).get_token()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token
)
# 生成随机数据
random_code
=
random
.
randint
(
0
,
8
)
random_code
=
random
.
randint
(
0
,
7
)
# 第二步进行规格型号模糊匹配查询
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url10"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
random_code
)
...
...
@@ -44,7 +45,7 @@ result = json.loads(result.content)
# 获取查询结果中数据
result
=
{
"data"
:
result
[
"data"
][
0
][
0
]}
result
[
"api_time"
]
=
api_time
#
print(result)
print
(
result
)
# 获取预期结果
check_dict
=
commonFuc
().
get_business_data
(
module
,
"checkDict10"
,
random_code
)
# print(check_dict)
...
...
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