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
a33dd578
Commit
a33dd578
authored
Oct 11, 2023
by
liguangyu06
Browse files
优化代码
parent
4be3303c
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_commodity_activity/商品_特价_数量满足规则_金额验证.air/商品_特价_数量满足规则_金额验证.py
View file @
a33dd578
...
...
@@ -48,8 +48,9 @@ product_price = result["data"][0]["referencePrice"]
purchase_quantity
=
random
.
randint
(
6
,
10
)
# 计算减免金额
amount
=
result
[
"data"
][
0
][
"directUnitPrice"
]
*
purchase_quantity
# 保留两位小数(四舍五入)
amount
=
round
(
amount
,
2
)
print
(
amount
)
# 第四步验证减免金额正确性
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url10"
)
request_body
=
commonFuc
().
get_business_data
(
module
,
"payload10"
,
company_code
,
product_id
,
product_code
,
product_price
,
...
...
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