Commit 1782e7ab authored by 张伟男's avatar 张伟男

AI

parent f5dad9ce
...@@ -14,6 +14,11 @@ class TestRecomendServices: ...@@ -14,6 +14,11 @@ class TestRecomendServices:
@pytest.mark.parametrize("param",recomendservice_data,ids=recomendservice_case) @pytest.mark.parametrize("param",recomendservice_data,ids=recomendservice_case)
def test_recomend_services(self,param): def test_recomend_services(self,param):
r = oneimage_request().recomend_services(param["version"], param["business_tags_names"]) r = oneimage_request().recomend_services(param["version"], param["business_tags_names"])
assert r["error"] == param["assert"] if r["error"] == 0:
data = r.get("data")
assert len(data) == param["assert"]
gm_url = data[0].get("gm_url")
assert gm_url.startswith("gengmei://search_result?searchTabType=0") == True, f'返回并非搜索协议,实际是{gm_url}'
assert len(data[0].get("service")) > 0, f'根据五官返回美购个数有误,实际是{len(data[0].get("service"))}'
...@@ -17,8 +17,6 @@ class TestShareV4: ...@@ -17,8 +17,6 @@ class TestShareV4:
@pytest.mark.parametrize("param",sharev4_data,ids=sharev4_case) @pytest.mark.parametrize("param",sharev4_data,ids=sharev4_case)
def test_share_v4(self,param): def test_share_v4(self,param):
r = oneimage_request().share_v4(param["version"], param["face_id"]) r = oneimage_request().share_v4(param["version"], param["face_id"])
if r["error"] == 0: assert r["error"] == 0
data = r.get("data")
assert 1 == 1
recomend_services: recomend_services:
#成功登录case #测颜值根据五官推荐美购
- -
case: "请求成功,有数据返回" case: "请求成功,返回个数正确"
version: "7.42.2" version: "7.42.2"
business_tags_names: '[[],[],["玻尿酸垫下巴","自体脂肪垫下巴","硅胶垫下巴","膨体垫下巴"],["半永久纹眉","植眉"],["玻尿酸丰唇","胶原蛋白填充丰唇","自体脂肪丰唇"],[],["开内眼角"],["射频提升","热拉提","热拉提plus","热玛吉","超声提升"],["热玛吉"],[],["注射瘦脸","激光溶脂瘦脸","取颊脂垫瘦脸","光纤溶脂瘦脸","下颌角整形"]]' business_tags_names: '[["玻尿酸垫下巴","自体脂肪垫下巴","硅胶垫下巴","膨体垫下巴"],["半永久纹眉","植眉"]]'
assert: 0 assert: 2
\ No newline at end of file \ No newline at end of file
share_v4: share_v4:
#成功登录case #测颜值结果
- -
case: "请求成功,有数据返回" case: "请求成功,有数据返回"
version: "7.42.2" version: "7.42.2"
......
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