Commit d15b8ce9 authored by 张慧's avatar 张慧

次卡商祥页case完善

parent 22ddcd53
......@@ -186,20 +186,15 @@ class janus_request(BaseRequest):
return self.api_send(self.data['coupon_my_list'])
# 次卡订单详情页(未使用 和 部分使用 和 已使用)
def beauty_card_order_detail(self,order_id):
def beauty_card_order_detail(self, order_id):
self.params['order_id'] = order_id
return self.api_send(self.data['beauty_card_order_detail'])
# 次卡商详页
def beauty_card_detail(self, spu_id, sku_id, welfareId, version, current_city_id, lat, lng ):
def beauty_card_detail(self, spu_id, sku_id, version):
self.params['spu_id'] = spu_id
self.params['sku_id'] = sku_id
self.params['welfareId'] = welfareId
self.params['version'] = version
self.params['current_city_id'] = current_city_id
self.params['lat'] = lat
self.params['lng'] = lng
return self.api_send(self.data["beauty_card_detail"])
......
......@@ -139,11 +139,7 @@ beauty_card_detail:
params:
spu_id: ${spu_id}
sku_id: ${sku_id}
welfareId: ${welfareId}
version: ${version}
current_city_id: ${current_city_id}
lat: ${lat}
lng: ${lng}
data: { }
json: { }
......
......@@ -12,7 +12,9 @@ class TestBeautyCardDetail:
@pytest.mark.parametrize("param", beauty_card_detail_data, ids=beauty_card_detail_case)
def test_beauty_card_detail(self, param):
r = janus_request().beauty_card_detail(param["spu_id"], param["sku_id"], param["welfareId"], param["version"], param["current_city_id"], param["lat"], param["lng"])
r = janus_request().beauty_card_detail(param["spu_id"], param["sku_id"], param["version"])
if r["error"] == 0:
assert len(r["data"]["beautycart_list"]) > param["assert"]
if param["spu_id"] == 100018:
assert r["error"] == param["assert_error"]
if param["spu_id"] == 1000180:
assert r["data"] == param["assert_data"]
beauty_card_detail:
#次卡商详页
-
case: "次卡商详页spuid=100018"
assert: 0
case: "次卡商详页spu正常case"
spu_id: 100018
sku_id: 10046
welfareId: 100018
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
assert_error: 0
-
case: "次卡商详页spuid=100021"
assert: 0
spu_id: 100021
sku_id: 10159
welfareId: 100021
case: "次卡商详页spu不存在case"
spu_id: 1000180
sku_id: 10046
version: 7.44.0
current_city_id: beijing
lat: 40.001879
lng: 116.487194
assert_data: {}
......
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