Commit be767162 authored by 张慧's avatar 张慧

次卡商品列表接口case完善

parent b27ee191
...@@ -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
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment