Commit 3fae599d authored by 张慧's avatar 张慧

次卡-提交退款申请接口

parent 90fe57cc
...@@ -166,6 +166,14 @@ class janus_request(BaseRequest): ...@@ -166,6 +166,14 @@ class janus_request(BaseRequest):
self.params["order_id"] = order_id self.params["order_id"] = order_id
return self.api_send(self.data["beauty_card_refund_info"]) return self.api_send(self.data["beauty_card_refund_info"])
#次卡-提交退款申请
def beauty_card_refund_submit(self, order_id, reason_id, reason_text, reason_type):
self.params["order_id"] = order_id
self.params["reason_id"] = reason_id
self.params["reason_text"] = reason_text
self.params["reason_type"] = reason_type
return self.api_send(self.data["beauty_card_refund_submit"])
# 新版本我的美券列表 # 新版本我的美券列表
def product_my_list(self,start_num,tab_id): def product_my_list(self,start_num,tab_id):
self.params['start_num'] = start_num self.params['start_num'] = start_num
...@@ -174,41 +182,43 @@ class janus_request(BaseRequest): ...@@ -174,41 +182,43 @@ class janus_request(BaseRequest):
if __name__ == '__main__': if __name__ == '__main__':
#打印购物车-猜你喜欢列表接口返回 # #打印购物车-猜你喜欢列表接口返回
print(janus_request().mine_guess_you_like()) # print(janus_request().mine_guess_you_like())
#打印商祥页-详情接口返回 # #打印商祥页-详情接口返回
print(janus_request().product_detail("5857263", "618788", "7.43.0")) # print(janus_request().product_detail("5857263", "618788", "7.43.0"))
#打印商祥页-sku信息接口返回 # #打印商祥页-sku信息接口返回
print(janus_request().sku_info("5857263", "618788")) # print(janus_request().sku_info("5857263", "618788"))
#打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回 # #打印商祥页-美券列表-我的美券点击-744版本及以后-新接口返回
print(janus_request().product_coupon_my_list(0, 0)) # print(janus_request().product_coupon_my_list(0, 0))
#
#品类聚合页面商品列表接口返回 # #品类聚合页面商品列表接口返回
print(janus_request().tag_service()) # print(janus_request().tag_service())
print("fgx") # print("fgx")
#
#品类聚合页面标签和专场 # #品类聚合页面标签和专场
print(janus_request().polymer()) # print(janus_request().polymer())
print("fgx") # print("fgx")
#
#打印次卡-确认订单接口返回 # #打印次卡-确认订单接口返回
print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0)) # print(janus_request().beauty_card_order_confirm("10176", 1, 1, 0))
#打印次卡-确认订单页面-修改手机号接口返回 # #打印次卡-确认订单页面-修改手机号接口返回
print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430")) # print(janus_request().beauty_card_update_phone("+8612348543876", 1, "084430"))
#打印次卡-提交订单接口返回 # #打印次卡-提交订单接口返回
print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0)) # print(janus_request().beauty_card_order_submit("12345678912", "10176", 1, 1, 0, 0))
#打印次卡-支付平台接口返回 # #打印次卡-支付平台接口返回
print(janus_request().beauty_card_payment_method("101670448736595")) # print(janus_request().beauty_card_payment_method("101670448736595"))
#打印次卡-微信支付接口返回 # #打印次卡-微信支付接口返回
print(janus_request().beauty_card_prepay_wechat("101353630959868")) # print(janus_request().beauty_card_prepay_wechat("101353630959868"))
# 打印次卡-支付宝支付接口返回 # # 打印次卡-支付宝支付接口返回
print(janus_request().beauty_card_prepay_alipay(0, "101353630959868")) # print(janus_request().beauty_card_prepay_alipay(0, "101353630959868"))
#打印次卡 - 订单详情接口返回 # #打印次卡 - 订单详情接口返回
print(janus_request().beauty_card_payment_detail("101353630959868")) # print(janus_request().beauty_card_payment_detail("101353630959868"))
#打印次卡 - 取消订单接口返回 # #打印次卡 - 取消订单接口返回
print(janus_request().beauty_card_payment_delete("101353630959868")) # print(janus_request().beauty_card_payment_delete("101353630959868"))
#打印次卡-申请退款接口返回 # #打印次卡-申请退款接口返回
print(janus_request().beauty_card_refund_info("102217820485006")) # print(janus_request().beauty_card_refund_info("102217820485006"))
#打印次卡-提交退款申请接口返回
print(janus_request().product_my_list(0, 0)) print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
# print(janus_request().product_my_list(0, 0))
...@@ -221,6 +221,19 @@ beauty_card_refund_info: ...@@ -221,6 +221,19 @@ beauty_card_refund_info:
json: {} json: {}
isLogin: 1 isLogin: 1
#次卡-提交退款申请
beauty_card_refund_submit:
method: post
url: /api/janus/beauty_card/refund/submit
params: {}
data:
order_id: ${order_id}
reason_id: ${reason_id}
reason_text: ${reason_text}
reason_type: ${reason_type}
json: {}
isLogin: 1
#新版本我的美券 #新版本我的美券
coupon_my_list: coupon_my_list:
method: get method: get
......
...@@ -284,6 +284,8 @@ BEAUTY_CARD_PAYMENT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_d ...@@ -284,6 +284,8 @@ BEAUTY_CARD_PAYMENT_DETAIL = os.path.join(BASE_DIR, "backend_auto/test_backend_d
BEAUTY_CARD_PAYMENT_DELETE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_payment_delete.yaml") BEAUTY_CARD_PAYMENT_DELETE = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_payment_delete.yaml")
#次卡-申请退款 #次卡-申请退款
BEAUTY_CARD_REFUND_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_refund_info.yaml") BEAUTY_CARD_REFUND_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_refund_info.yaml")
#次卡-提交退款申请
BEAUTY_CARD_REFUND_SUBMIT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_refund_submit.yaml")
#捜索结果页-医生/医院tab #捜索结果页-医生/医院tab
CONTENTV6_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml") CONTENTV6_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "search_request.yaml")
......
...@@ -6,11 +6,11 @@ import path_setting ...@@ -6,11 +6,11 @@ import path_setting
from in_common.base_request import BaseRequest from in_common.base_request import BaseRequest
class TestBeautyCardRefundinfo: class TestBeautyCardRefundInfo:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_REFUND_INFO) data = BaseRequest().api_load(path_setting.BEAUTY_CARD_REFUND_INFO)
beauty_card_refund_info_case, bbeauty_card_refund_info_data = get_ids(data, "beauty_card_refund_info") beauty_card_refund_info_case, beauty_card_refund_info_data = get_ids(data, "beauty_card_refund_info")
@pytest.mark.parametrize("param", bbeauty_card_refund_info_data, ids=beauty_card_refund_info_case) @pytest.mark.parametrize("param", beauty_card_refund_info_data, ids=beauty_card_refund_info_case)
def test_beauty_card_refund_info(self, param): def test_beauty_card_refund_info(self, param):
r = janus_request().beauty_card_refund_info(param["order_id"]) r = janus_request().beauty_card_refund_info(param["order_id"])
......
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 TestBeautyCardRefundSubmit:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_REFUND_SUBMIT)
beauty_card_refund_submit_case, beauty_card_refund_submit_data = get_ids(data, "beauty_card_refund_submit")
@pytest.mark.parametrize("param", beauty_card_refund_submit_data, ids=beauty_card_refund_submit_case)
def test_beauty_card_refund_submit(self, param):
r = janus_request().beauty_card_refund_submit(param["order_id"], param["reason_id"], param["reason_text"],
param["reason_type"])
if r["error"] == 1:
assert r["message"] == param["assert_message"]
beauty_card_refund_submit:
-
case: "次卡-提交退款申请-接口调用成功case"
order_id: "102813852173916"
reason_id: 3
reason_text: "个人身体原因"
reason_type: 0
assert_message: "订单已经退款"
\ 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