Commit 144dcf6d authored by 张伟男's avatar 张伟男

次卡订单

parent 3fae599d
......@@ -180,6 +180,11 @@ class janus_request(BaseRequest):
self.params['tab_id'] = tab_id
return self.api_send(self.data['coupon_my_list'])
# 次卡订单详情页(未使用 和 部分使用 和 已使用)
def beauty_card_order_detail(self,order_id):
self.params['order_id'] = order_id
return self.api_send(self.data['beauty_card_order_detail'])
if __name__ == '__main__':
# #打印购物车-猜你喜欢列表接口返回
......@@ -218,7 +223,7 @@ if __name__ == '__main__':
# #打印次卡-申请退款接口返回
# print(janus_request().beauty_card_refund_info("102217820485006"))
#打印次卡-提交退款申请接口返回
print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
# print(janus_request().beauty_card_refund_submit("102813852173916", 3, "个人身体原因", 0))
print(janus_request().beauty_card_order_detail(102247770691611))
# print(janus_request().product_my_list(0, 0))
......@@ -244,3 +244,12 @@ coupon_my_list:
isLogin: 1
#次卡-订单详情(未使用 和 部分使用 和 已使用)
beauty_card_order_detail:
method: get
url: /api/janus/beauty_card/order/detail
params:
order_id: ${order_id}
data: {}
json: {}
isLogin: 1
\ No newline at end of file
develop_host:
backend: http://backend.paas-develop.env
om: http://om.paas-develop.env
# doctor: http://doctor.paas-develop.env
doctor: http://doctor.paas-develop.env
# backend: https://backend.igengmei.com
......@@ -287,6 +287,9 @@ BEAUTY_CARD_REFUND_INFO = os.path.join(BASE_DIR, "backend_auto/test_backend_data
#次卡-提交退款申请
BEAUTY_CARD_REFUND_SUBMIT = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_refund_submit.yaml")
# 次卡订单详情页(未使用 部分使用 和 已使用)
BEAUTY_CARD_ORDER_DETAIL_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/janus_data", "beauty_card_order_detail.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 TestBeautyCardOrderDetailUsed:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_ORDER_DETAIL_DATA)
beauty_card_order_detail_used_case, beauty_card_order_detail_used_data = get_ids(data, "beauty_card_order_detail_used")
@pytest.mark.parametrize("param", beauty_card_order_detail_used_data, ids=beauty_card_order_detail_used_case)
def test_beauty_card_order_detail_used(self, param):
r = janus_request().beauty_card_order_detail(param["order_id"])
data = r["data"]
assert data["order_status"] == param["order_status"]
assert data["vertifi_detail"] == {}
used_beautycard_detail = data["used_beautycard_detail"]
title = used_beautycard_detail["title"]
used_time = used_beautycard_detail["used_time"]
hospital_name = used_beautycard_detail["hospital_name"]
assert title is not None
assert hospital_name is not None
import datetime
time = datetime.datetime.strptime(used_time,"%Y-%m-%d %H:%M:%S")
assert time < datetime.datetime.now()
print(time)
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 TestBeautyCardOrderDetailUsing:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_ORDER_DETAIL_DATA)
beauty_card_order_detail_using_case, beauty_card_order_detail_using_data = get_ids(data, "beauty_card_order_detail_using")
@pytest.mark.parametrize("param", beauty_card_order_detail_using_data, ids=beauty_card_order_detail_using_case)
def test_beauty_card_order_detail_used(self, param):
r = janus_request().beauty_card_order_detail(param["order_id"])
data = r["data"]
assert data["order_status"] == param["order_status"]
assert data["vertifi_detail"]["vertifi_count"] == param["vertifi_count"]
used_beautycard_detail = data["used_beautycard_detail"]
title = used_beautycard_detail["title"]
used_time = used_beautycard_detail["used_time"]
hospital_name = used_beautycard_detail["hospital_name"]
assert title is not None
assert hospital_name is not None
import datetime
time = datetime.datetime.strptime(used_time,"%Y-%m-%d %H:%M:%S")
assert time < datetime.datetime.now()
print(time)
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 TestBeautyCardOrderDetailWaitUse:
data = BaseRequest().api_load(path_setting.BEAUTY_CARD_ORDER_DETAIL_DATA)
beauty_card_order_detail_waituse_case, beauty_card_order_detail_waituse_data = get_ids(data, "beauty_card_order_detail_waituse")
@pytest.mark.parametrize("param", beauty_card_order_detail_waituse_data, ids=beauty_card_order_detail_waituse_case)
def test_beauty_card_order_detail_used(self, param):
r = janus_request().beauty_card_order_detail(param["order_id"])
data = r["data"]
assert data["order_status"] == param["order_status"]
assert data["vertifi_detail"]["vertifi_count"] == param["vertifi_count"]
used_beautycard_detail = data["used_beautycard_detail"]
assert used_beautycard_detail == {}
beauty_card_order_detail_used:
-
case: "已使用次卡订单详情页"
order_id: 102247770691611
order_status: "5"
beauty_card_order_detail_using:
-
case: "部分使用次卡订单详情页"
order_id: 102794850373958
order_status: "4"
vertifi_count: "1"
beauty_card_order_detail_waituse:
-
case: "未使用次卡订单详情页"
order_id: 102625993440278
order_status: "4"
vertifi_count: "2"
\ 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