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

# AI测颜值,目前测试环境没有召回日记，先保证请求成功
class TestPlasticnAnalysisV3:
    data = BaseRequest().api_load(path_setting.GMAI_PLASTIC_ANALYSIS_V3_DATA)
    plasticanalysisv3_case, plasticanalysisv3_data = get_ids(data, "analysis_v3")

    @pytest.mark.parametrize("param",plasticanalysisv3_data,ids=plasticanalysisv3_case)
    def test_plastic_analysis_v3(self,param):
        r = gmai_request().plastic_analysis_v3(param["device_id"], param["image_url"], param["landmark"] ,param["cheek_style_classify_id"])
        assert r["error"] == 0