Commit 16d64d2b authored by 张慧's avatar 张慧

次卡-确认订单接口

parent b944b4a6
......@@ -110,6 +110,13 @@ class janus_request(BaseRequest):
return self.api_send(self.data['keyword_tip'])
#次卡-确认订单
def beauty_card_confirm(self, sku_id, number, use_bc_coupon, bc_coupon_id):
self.params["sku_id"] = sku_id
self.params["number"] = number
self.params["use_bc_coupon"] = use_bc_coupon
self.params["bc_coupon_id"] = bc_coupon_id
return self.api_send(self.data["beauty_card_confirm"])
if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回
......@@ -129,6 +136,9 @@ if __name__ == '__main__':
print(janus_request().polymer())
print("fgx")
#打印次卡-确认订单接口返回
print(janus_request().beauty_card_confirm("10176", 1, 1, 0))
......@@ -107,6 +107,20 @@ keyword_tip:
data: {}
json: {}
#次卡-确认订单
beauty_card_confirm:
method: post
url: /api/janus/beauty_card/order/confirm
params: {}
data:
sku_id: ${sku_id}
number: ${number}
bctraceid: ""
use_bc_coupon: ${use_bc_coupon}
bc_coupon_id: ${bc_coupon_id}
json: {}
isLogin: 1
......
......@@ -202,6 +202,9 @@ PRODUCT_COUPON_MY_LIST = os.path.join(BASE_DIR, "backend_auto/test_backend_data/
HYBRID_PROMOTION_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "hybrid_promotion_request.yaml")
RELATED_SERVICE_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/hybrid_promotion_data", "related_service_data.yaml")
#次卡-确认订单
BEAUTY_CARD_CONFIRM = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_confirm.yaml")
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
CONTENTV6 = os.path.join(BASE_DIR, "backend_auto/test_backend_data/search_data", "content_v6.yaml")
......
import pytest
from all_backend_api.janus_request import janus_request
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
class TestBeautyCardConfirm:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_CONFIRM)
beauty_card_confirm_case, beauty_card_confirm_data = get_ids(data, "beauty_card_confirm")
@pytest.mark.parametrize("param", beauty_card_confirm_data, ids=beauty_card_confirm_case)
def test_beauty_card_confirm(self, param):
r = janus_request().beauty_card_confirm(param["sku_id"], param["number"], param["use_bc_coupon"], param["bc_coupon_id"])
if r["error"] == 0:
assert r["error"] == param["assert_error"]
beauty_card_confirm:
-
case: "次卡-确认订单-接口调用成功case"
sku_id: "10176"
number: 1
use_bc_coupon: 1
bc_coupon_id: 0
assert_error: 0
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