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
efa3c1b2
Commit
efa3c1b2
authored
Feb 05, 2024
by
liguangyu06
Browse files
优化
parent
bd416cb1
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_demand/快速下单-二审审核拒绝.air/快速下单-二审审核拒绝.py
View file @
efa3c1b2
...
...
@@ -21,7 +21,7 @@ password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token1
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
headers1
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token1
)
print
(
headers1
)
# 第二步进行需求单创建
url1
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url4"
)
request_body1
=
commonFuc
().
get_business_data
(
module
,
"payload4"
)
...
...
@@ -38,11 +38,12 @@ order_num = result1["data"]["国药集团北京医疗器械有限公司"]["deman
# 登录后台管理系统获取token信息
# 获取登录后台管理系统所需账号密码
username1
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password1
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username1
=
commonFuc
().
get_business_data
(
module
,
"username
4
"
)
password1
=
commonFuc
().
get_business_data
(
module
,
"password
4
"
)
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token
=
CmdcDoLogin
(
username1
,
password1
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
# print(username1, password1)
# 第三步在需求单列表根据订单编号查询出新创建的需求单
url2
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url80"
)
...
...
@@ -50,6 +51,7 @@ request_body2 = commonFuc().get_business_data(module, "payload80")
# 发送请求
result2
=
requests
.
post
(
url2
,
json
=
request_body2
,
headers
=
headers
)
result2
=
json
.
loads
(
result2
.
content
)
# print(result2)
# 获取预期结果
check_dict2
=
commonFuc
().
get_business_data
(
module
,
"checkDict80"
)
# 断言实际结果中是否包含预期结果的内容
...
...
air_case/cmdc_demand/快速下单-二审通过.air/快速下单-二审通过.py
View file @
efa3c1b2
...
...
@@ -38,8 +38,8 @@ order_num = result1["data"]["国药集团北京医疗器械有限公司"]["deman
# 登录后台管理系统获取token信息
# 获取登录后台管理系统所需账号密码
username1
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password1
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username1
=
commonFuc
().
get_business_data
(
module
,
"username
4
"
)
password1
=
commonFuc
().
get_business_data
(
module
,
"password
4
"
)
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token
=
CmdcDoLogin
(
username1
,
password1
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
...
...
air_case/cmdc_demand/快速下单-审核拒绝.air/快速下单-审核拒绝.py
View file @
efa3c1b2
...
...
@@ -28,18 +28,15 @@ request_body1 = commonFuc().get_business_data(module, "payload4")
# 发送请求
result1
=
requests
.
post
(
url1
,
json
=
request_body1
,
headers
=
headers1
)
result1
=
json
.
loads
(
result1
.
content
)
# # 获取预期结果
# check_dict1 = commonFuc().get_business_data(module, "checkDict4")
# # 断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(check_dict1, result1)
# 获取新创建需求单对应的订单编号
order_num
=
result1
[
"data"
][
"国药集团北京医疗器械有限公司"
][
"demandItems"
][
0
][
"demandCode"
]
# print(order_num)
# 登录后台管理系统获取token信息
# 获取登录后台管理系统所需账号密码
username1
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password1
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
username1
=
commonFuc
().
get_business_data
(
module
,
"username
4
"
)
password1
=
commonFuc
().
get_business_data
(
module
,
"password
4
"
)
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token
=
CmdcDoLogin
(
username1
,
password1
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
...
...
air_case/cmdc_demand/快速下单-申请取消-审核.air/快速下单-申请取消-审核.py
View file @
efa3c1b2
...
...
@@ -55,8 +55,8 @@ result3 = json.loads(result3.content)
"""
# 步骤六在后台运营系统查询出用户提交取消申请
# 登录后台运营系统获取token信息
username
=
commonFuc
().
get_business_data
(
module
,
"username
1
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
1
"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
4
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
4
"
)
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token
=
CmdcDoLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers"
,
cmdc_access_token
)
...
...
data/cmdc_demand/data
View file @
efa3c1b2
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