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
b27ee191
Commit
b27ee191
authored
Aug 20, 2021
by
张慧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
次卡橱窗商品列表接口case完善
parent
0e0c0159
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
16 deletions
+57
-16
visual_beauty_card.py
all_backend_api/visual_beauty_card.py
+3
-3
test_visual_beauty_card_services.py
...sual_beauty_card_case/test_visual_beauty_card_services.py
+29
-5
visual_beauty_card_services.yaml
.../visual_beauty_card_data/visual_beauty_card_services.yaml
+25
-8
No files found.
all_backend_api/visual_beauty_card.py
View file @
b27ee191
...
@@ -10,7 +10,7 @@ class visual_beauty_card_request(BaseRequest):
...
@@ -10,7 +10,7 @@ class visual_beauty_card_request(BaseRequest):
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTYCARD_FILTERS_CONFIG
)
self
.
data
=
self
.
api_load
(
path_setting
.
BEAUTYCARD_FILTERS_CONFIG
)
#自定义专题-更美次卡橱窗组件商品
#自定义专题-更美次卡橱窗组件商品
def
visual_beauty_card_services
(
self
,
unit_id
,
current_city_id
,
page
,
page_size
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
visual_beauty_card_services
(
self
,
unit_id
,
current_city_id
,
page
,
page_size
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"page"
]
=
page
self
.
params
[
"page"
]
=
page
...
@@ -20,7 +20,7 @@ class visual_beauty_card_request(BaseRequest):
...
@@ -20,7 +20,7 @@ class visual_beauty_card_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'visual_beauty_card_services'
])
return
self
.
api_send
(
self
.
data
[
'visual_beauty_card_services'
])
#自定义专题-更美次卡商品列表筛选器
#自定义专题-更美次卡商品列表筛选器
def
beautycard_filters
(
self
,
unit_id
,
current_city_id
,
version
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
beautycard_filters
(
self
,
unit_id
,
current_city_id
,
version
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"current_city_id"
]
=
current_city_id
self
.
params
[
"version"
]
=
version
self
.
params
[
"version"
]
=
version
...
@@ -28,7 +28,7 @@ class visual_beauty_card_request(BaseRequest):
...
@@ -28,7 +28,7 @@ class visual_beauty_card_request(BaseRequest):
return
self
.
api_send
(
self
.
data
[
'beautycard_filters'
])
return
self
.
api_send
(
self
.
data
[
'beautycard_filters'
])
#自定义专题-更美次卡商品列表组件商品
#自定义专题-更美次卡商品列表组件商品
def
beautycard_skus
(
self
,
unit_id
,
tag_id
,
area
,
sort_type
,
page
,
page_size
,
device_id
=
'97B6764B-2135-4761-9911-701C38CBC272'
):
def
beautycard_skus
(
self
,
unit_id
,
tag_id
,
area
,
sort_type
,
page
,
page_size
):
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"unit_id"
]
=
unit_id
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"tag_id"
]
=
tag_id
self
.
params
[
"area"
]
=
area
self
.
params
[
"area"
]
=
area
...
...
test_backend_case/visual_beauty_card_case/test_visual_beauty_card_services.py
View file @
b27ee191
...
@@ -12,8 +12,32 @@ class TestVisualBeautyCardServices:
...
@@ -12,8 +12,32 @@ class TestVisualBeautyCardServices:
@pytest.mark.parametrize
(
"param"
,
visual_beauty_card_services_data
,
ids
=
visual_beauty_card_services_case
)
@pytest.mark.parametrize
(
"param"
,
visual_beauty_card_services_data
,
ids
=
visual_beauty_card_services_case
)
def
test_visual_beauty_card_services
(
self
,
param
):
def
test_visual_beauty_card_services
(
self
,
param
):
print
(
'次卡橱窗'
)
r
=
visual_beauty_card_request
()
.
visual_beauty_card_services
(
param
[
"unit_id"
],
param
[
"current_city_id"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"version"
])
r
=
visual_beauty_card_request
()
.
visual_beauty_card_services
(
param
[
"unit_id"
],
param
[
"current_city_id"
],
param
[
"page"
],
param
[
"page_size"
],
param
[
"version"
])
if
r
[
"data"
][
"beautycards"
]:
if
param
[
"unit_id"
]
==
"20105"
:
print
(
'次卡橱窗有商品'
)
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_spu"
]
assert
len
(
r
[
"data"
][
"beautycards"
])
!=
param
[
"assert"
]
assert
r
[
"data"
][
"beautycards"
][
0
][
"bc_spu_id"
]
is
not
None
\ No newline at end of file
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
if
param
[
"unit_id"
]
==
"20106"
:
assert
len
(
r
[
"data"
][
"beautycards"
])
>
param
[
"assert_sku"
]
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
\ No newline at end of file
test_backend_data/visual_beauty_card_data/visual_beauty_card_services.yaml
View file @
b27ee191
visual_beauty_card_services
:
visual_beauty_card_services
:
-
-
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
#更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case
:
"
更美次卡橱窗-按SPU导入,定位北京,商品正常召回"
case
:
"
更美次卡橱窗-按SPU导入,定位北京,商品正常召回
case
"
unit_id
:
"
20105"
unit_id
:
"
20105"
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
page
:
"
0"
page
:
"
0"
page_size
:
"
50"
page_size
:
"
50"
version
:
"
743.0"
version
:
"
7.43.0"
assert
:
0
assert_spu
:
0
-
#更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常
case
:
"
更美次卡橱窗-按SPU导入,定位北京,接口字段返回正常case"
unit_id
:
"
20105"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
7.43.0"
assert_spu
:
0
-
-
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
#更美次卡橱窗-按SKU导入,定位北京,商品正常召回
case
:
"
更美次卡橱窗-按SKU导入,定位北京,商品正常召回"
case
:
"
更美次卡橱窗-按SKU导入,定位北京,商品正常召回case"
unit_id
:
"
20106"
current_city_id
:
"
beijing"
page
:
"
0"
page_size
:
"
50"
version
:
"
7.43.0"
assert_sku
:
0
-
#更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常
case
:
"
更美次卡橱窗-按SKU导入,定位北京,接口字段返回正常case"
unit_id
:
"
20106"
unit_id
:
"
20106"
current_city_id
:
"
beijing"
current_city_id
:
"
beijing"
page
:
"
0"
page
:
"
0"
page_size
:
"
50"
page_size
:
"
50"
version
:
"
743.0"
version
:
"
7.43.0"
assert
:
0
assert_sku
:
0
\ No newline at end of file
\ 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