Commit ff52eb4c authored by 张慧's avatar 张慧

次卡订单详情接口

parent bb0e0692
......@@ -151,6 +151,11 @@ class janus_request(BaseRequest):
self.params["payment_id"] = payment_id
return self.api_send(self.data["beauty_card_prepay_alipay"])
#次卡-订单详情
def beauty_card_payment_detail(self, payment_id):
self.params["payment_id"] = payment_id
return self.api_send(self.data["beauty_card_payment_detail"])
# 新版本我的美券列表
def product_my_list(self,start_num,tab_id):
self.params['start_num'] = start_num
......@@ -188,6 +193,8 @@ if __name__ == '__main__':
print(janus_request().beauty_card_prepay_wechat("101353630959868"))
# 打印次卡-支付宝支付接口返回
print(janus_request().beauty_card_prepay_alipay(0, "101353630959868"))
#打印次卡 - 订单详情接口返回
print(janus_request().beauty_card_payment_detail("101353630959868"))
print(janus_request().product_my_list(0, 0))
......@@ -191,6 +191,16 @@ beauty_card_prepay_alipay:
# json: {}
# isLogin: 1
#次卡-订单详情
beauty_card_payment_detail:
method: get
url: /api/janus/beauty_card/payment/detail
params:
payment_id: ${payment_id}
data: {}
json: {}
isLogin: 1
#新版本我的美券
coupon_my_list:
method: get
......
......@@ -276,7 +276,10 @@ BEAUTY_CARD_ORDER_SUBMIT = os.path.join(BASE_DIR, "backend_auto/test_backend_dat
BEAUTY_CARD_PAYMENT_METHOD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_payment_method.yaml")
#次卡-微信支付
BEAUTY_CARD_PREPAY_WECHAT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_prepay_wechat.yaml")
#次卡-支付宝支付
BEAUTY_CARD_PREPAY_ALIPAY = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_prepay_alipay.yaml")
#次卡-订单详情
BEAUTY_CARD_PAYMENT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_payment_detail.yaml")
#捜索结果页-医生/医院tab
CONTENTV6_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.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 TestBeautyCardPaymentDetail:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_PAYMENT_DETAIL)
beauty_card_payment_detail_case, beauty_card_payment_detail_data = get_ids(data, "beauty_card_payment_detail")
@pytest.mark.parametrize("param", beauty_card_payment_detail_data, ids=beauty_card_payment_detail_case)
def test_beauty_card_payment_detail(self, param):
payment = janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0)
payment_id = payment["data"]["payment_id"]
r = janus_request().beauty_card_payment_detail(payment_id)
if r["error"] == 0:
assert r["error"] == param["assert_error"]
beauty_card_payment_detail:
-
case: "次卡订单详情-接口调用成功case"
assert_error: 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