Commit c95b57d7 authored by 张伟男's avatar 张伟男

AI,beautycard

parent c000a00b
......@@ -15,7 +15,9 @@ class TestSimulateAnalyze:
r = gmai_request().simulate_analyze(param["device_id"], param["image_url"], param["style_id"] ,param["type_id"])
assert r["error"] == 0
gm_url = r["data"]["plastic_image_url"]
content = r["data"]["content"]
print("效果图: ", gm_url)
print("效果文案: ", content)
before_charm_val = r["data"]["before_charm_val"]
after_charm_val = r["data"]["after_charm_val"]
assert before_charm_val < after_charm_val
\ No newline at end of file
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.orders_request import orders_request
class TestOrdersMyV2Used:
data = BaseRequest().api_load(path_setting.ORDERS_MY_V2_DATA)
my_order_used_case, my_order_used_data = get_ids(data, "used")
@pytest.mark.parametrize("param",my_order_used_data,ids=my_order_used_case)
def test_orders_used(self,param):
no_more_data = False
i = 0
found_usedBeautycard = False
while no_more_data is False:
r = orders_request().my_v2(i*10, param["status"], param["version"])
i += 1
no_more_data = r["data"]["no_more_data"]
for order in r["data"]["orders"]:
if order["type"] == 4 and order["order"]["order_status"]["status"] == 5:
found_usedBeautycard = True
order_id = order["order"]["order_id"]
print("次卡单id: ", order_id)
# 按钮文案
text = order["order"]["order_status"]["text"]
assert text == "已使用"
assert order["gm_url"] == "gengmei://order_beauty_card_detail?order_id={}&type=4".format(order_id)
# 按钮信息
buttons_title = order["buttons"][0]["title"]
buttons_url = order["buttons"][0]["url"]
assert buttons_title == "立即领取面膜"
assert buttons_url == "gengmei://common_webview?url=https://backend.igengmei.com/phantom/visual_special/2340"
# 7.46.0加的头图信息
icon_url = order["header"]["icon_url"]
gm_url = order["header"]["gm_url"]
title = order["header"]["title"]
break
if found_usedBeautycard: break
......@@ -23,7 +23,7 @@ class TestOrdersMyV2Waituse:
order_status = order["order"]["order_status"]["status"]
order_statust = order["order"]["order_status"]["text"]
gm_url = order["gm_url"]
print(order_id, order_status, order_statust, gm_url)
# print(order_id, order_status, order_statust, gm_url)
assert order_status == param["beauty_card_order_status"]
assert order_statust == param["beauty_card_order_statust"]
assert gm_url == param["beauty_card_order_gmurl"].format(order_id)
......@@ -35,6 +35,13 @@ class TestOrdersMyV2Waituse:
# 7.44.0加的领取面膜按钮
beauty_card_free_service_title = order["buttons"][1]["title"]
assert beauty_card_free_service_title == param["beauty_card_button_mianmo_title"]
# 7.46.0加的头图信息
icon_url = order["header"]["icon_url"]
gm_url = order["header"]["gm_url"]
title = order["header"]["title"]
# print(icon_url, gm_url, title)
assert icon_url == param["beauty_card_header_icon"]
assert gm_url not in (None, "")
# 普通美购订单
if order["type"] == 0:
# 订单信息
......@@ -43,5 +50,16 @@ class TestOrdersMyV2Waituse:
order_statust = order["order"]["order_status"]["text"]
assert order_status == param["putong_card_order_status"]
assert order_statust == param["putong_card_order_statust"]
print(order_status, order_statust)
# print(order_status, order_statust)
# 医生的医院信息
doctor_hospital_id = order["order"]["doctor_hospital_id"]
# 7.46.0增加头图信息
xcx_url = order["header"]["xcx_url"]
icon_url = order["header"]["icon_url"]
gm_url = order["header"]["gm_url"]
title = order["header"]["title"]
print(xcx_url, icon_url, gm_url, title)
assert xcx_url == "/packageBusiness/pages/org/main?hospital_id={}".format(doctor_hospital_id)
assert icon_url is not ""
assert gm_url == "gengmei://organization_detail?organization_id={}".format(doctor_hospital_id)
assert title is not ""
......@@ -43,4 +43,19 @@ simulate_analyze:
device_id: "869412032478155"
image_url: "2021/06/07/1451/86b01d9a9d66"
style_id: 2
type_id: 8
\ No newline at end of file
type_id: 8
#模拟口红
-
case: "蜜桃粉口红效果"
device_id: "androidid_7255c3398845cdd5"
image_url: "2021/07/20/1431/9d8709706125"
style_id: 1
type_id: 10
-
case: "复古红口红效果"
device_id: "androidid_7255c3398845cdd5"
image_url: "2021/07/20/1431/9d8709706125"
style_id: 3
type_id: 10
\ No newline at end of file
......@@ -12,4 +12,14 @@ waituse:
beauty_card_button_gmurl : "gengmei://order_beauty_card_reserve?order_id={}"
beauty_card_button_mianmo_title : "立即领取面膜"
putong_card_order_status : "1"
putong_card_order_statust : "待使用"
\ No newline at end of file
putong_card_order_statust : "待使用"
beauty_card_header_icon: "https://heras.igengmei.com/2021/06/23/2fe8088602"
used:
#已使用的次卡订单
-
case: "全部tab下已使用的次卡订单"
start_num: 0
status: -1
version: "7.44.0"
\ No newline at end of file
......@@ -3,7 +3,7 @@ reply_create:
beuzhu: '# 备注: 这个文件有冲突的话,那个版本都行不会影响,回退/接受当前版本都行,因为每次运行content都会改变'
case: 日记贴一级评论创建--正常校验&创建二级评论--正常校验
channel: benzhan
content: ces测试+2021-07-14 18:15:39
content: ces测试+2021-07-16 16:30:24
message: 请勿回复重复内容
message1: 回复成功
message2: 你的回复有点频繁,稍后再来
......
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