Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
backend_auto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
邓莹莹
backend_auto
Commits
be767162
Commit
be767162
authored
Aug 20, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
次卡商品列表接口case完善
parent
b27ee191
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
5 deletions
+40
-5
test_beautycard_skus.py
...kend_case/visual_beauty_card_case/test_beautycard_skus.py
+17
-5
beautycard_skus.yaml
...backend_data/visual_beauty_card_data/beautycard_skus.yaml
+23
-0
No files found.
test_backend_case/visual_beauty_card_case/test_beautycard_skus.py
View file @
be767162
...
@@ -13,7 +13,20 @@ class TestBeautyCardSkus:
...
@@ -13,7 +13,20 @@ class TestBeautyCardSkus:
@pytest.mark.parametrize
(
"param"
,
beautycard_skus_data
,
ids
=
beautycard_skus_case
)
@pytest.mark.parametrize
(
"param"
,
beautycard_skus_data
,
ids
=
beautycard_skus_case
)
def
test_beautycard_skus
(
self
,
param
):
def
test_beautycard_skus
(
self
,
param
):
print
(
'次卡商品列表组件商品'
)
print
(
'次卡商品列表组件商品'
)
r
=
visual_beauty_card_request
()
.
beautycard_skus
(
param
[
"unit_id"
],
param
[
"tag_id"
],
param
[
"area"
],
param
[
"sort_type"
],
param
[
"page"
],
param
[
"page_size"
])
r
=
visual_beauty_card_request
()
.
beautycard_skus
(
param
[
"unit_id"
],
param
[
"tag_id"
],
param
[
"area"
],
if
r
[
"data"
]:
param
[
"sort_type"
],
param
[
"page"
],
param
[
"page_size"
])
print
(
'次卡商品列表组件有商品召回'
)
if
r
[
"error"
]
==
0
:
assert
len
(
r
[
"data"
][
"beautycards"
])
!=
param
[
"assert"
]
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert"
]
\ No newline at end of file
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_spu"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_id"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_sku_name"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_image"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_origin_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_gengmei_price"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"sales_amount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"gm_url"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"rank"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"has_discount"
]
is
not
None
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_discount_total_payment"
]
is
not
None
test_backend_data/visual_beauty_card_data/beautycard_skus.yaml
View file @
be767162
...
@@ -108,3 +108,25 @@ beautycard_skus:
...
@@ -108,3 +108,25 @@ beautycard_skus:
page
:
"
0"
page
:
"
0"
page_size
:
"
20"
page_size
:
"
20"
assert
:
0
assert
:
0
-
#更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case
case
:
"
更美次卡商品列表组件商品-按SPU导入,接口返回字段正常case"
unit_id
:
"
20109"
tag_id
:
"
-1"
area
:
"
worldwide"
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
assert
:
0
-
#更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case
case
:
"
更美次卡商品列表组件商品-按SKU导入,接口返回字段正常case"
unit_id
:
"
20113"
tag_id
:
"
-1"
area
:
"
worldwide"
sort_type
:
"
0"
page
:
"
0"
page_size
:
"
20"
assert
:
0
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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