Commit 0c466a09 authored by 张伟男's avatar 张伟男

模拟双眼皮

parent a4184fa4
......@@ -13,7 +13,16 @@ class gmai_request(BaseRequest):
return self.api_send(self.data["skin_newReport"])
# 模拟双眼皮
def eyelids_plastic(self,version,image_url,style_id):
self.params["version"] = version
self.params["image_url"] = image_url
self.params["style_id"] = style_id
return self.api_send(self.data["eyelids_plastic"])
if __name__ == '__main__':
print(gmai_request().skin_newReport("7.43.0","https://pic.igengmei.com/2021/05/11/1440/25e4bf45673f-s"))
\ No newline at end of file
# if __name__ == '__main__':
# # print(gmai_request().skin_newReport("7.43.0","https://pic.igengmei.com/2021/05/11/1440/25e4bf45673f-s"))
# # print(gmai_request().eyelids_plastic("7.43.0", "2021/05/12/1457/cdbe8652117d","3"))
......@@ -7,4 +7,11 @@ skin_newReport:
image_url: ${image_url}
eyelids_plastic:
method: post
url: /gm_ai/eyelids/plastic
params:
version: ${version}
data:
image_url: ${image_url}
style_id: ${style_id}
......@@ -53,6 +53,9 @@ ONEIMAGE_RECOMEND_SERVICES_DATA = os.path.join(BASE_DIR, "backend_auto/test_back
# 测肤结果页
GMAI_SKIN_NEWREPORT_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "gmai_request.yaml")
GMAI_SKIN_NEWREPORT_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "skin_newReport.yaml")
# 模拟双眼皮
GMAI_EYELIDS_PLASTIC_DATA = os.path.join(BASE_DIR, "backend_auto/test_backend_data/gmai_data", "eyelids_plastic.yaml")
LOGIN_PASSWD = os.path.join(BASE_DIR, "backend_auto/test_backend_data/accounts_data", "login_passwd.yaml")
LOGIN_CONFIG = os.path.join(BASE_DIR, "backend_auto/all_backend_api", "accounts_request.yaml")
......
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.gmai_request import gmai_request
# 模拟双眼皮效果
class TestEyelidsPlastic:
data = BaseRequest().api_load(path_setting.GMAI_EYELIDS_PLASTIC_DATA)
eyelidsplastic_case, eyelidsplastic_data = get_ids(data, "eyelids_plastic")
@pytest.mark.parametrize("param",eyelidsplastic_data,ids=eyelidsplastic_case)
def test_skinnewReport(self,param):
r = gmai_request().eyelids_plastic(param["version"], param["image_url"],param["style_id"])
assert r["error"] == 0
eyelids_plastic:
#模拟双眼皮效果
-
case: "平行双眼皮效果"
version: "7.43.0"
image_url: "2021/05/12/1457/cdbe8652117d"
style_id: "1"
-
case: "开扇双眼皮效果"
version: "7.43.0"
image_url: "2021/05/12/1457/cdbe8652117d"
style_id: "3"
\ 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