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
a411e7c4
Commit
a411e7c4
authored
Feb 18, 2024
by
liguangyu06
Browse files
优化
parent
cbad8b8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_fresenius_group/套包更新_套包内商品需满足同一产品线.air/套包更新_套包内商品需满足同一产品线.py
View file @
a411e7c4
...
...
@@ -9,6 +9,7 @@ case_tag:cmdc_api,cmdc套包更新_套包内商品需满足同一产品线,2264,
from
common.common_func
import
commonFuc
from
air_case.cmdc_login.后台管理系统登录.后台管理系统登录
import
CmdcDoLogin
import
requests
import
uuid
import
json
module
=
"cmdc_fresenius_group"
...
...
@@ -28,11 +29,18 @@ request_body = commonFuc().get_business_data(module, "payload1")
result
=
requests
.
post
(
url
,
json
=
request_body
,
headers
=
headers
)
result
=
json
.
loads
(
result
.
content
)
# 获取现有套包
名称
# 获取现有套包
信息
product_json
=
result
[
"data"
][
"list"
][
0
][
"products"
][
0
]
# 生成随机字符串用于当做套包名称
group_name
=
str
(
uuid
.
uuid4
())[:
10
]
# 获取套包信息
group_json
=
result
[
"data"
][
"list"
][
0
]
# 更新套包名称
group_json
[
"groupName"
]
=
group_name
# 获取其他产品线商品信息
other_product
=
commonFuc
().
get_business_data
(
module
,
"other_product"
)
# 获取到套包中商品信息并进行更新操作
...
...
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