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 TestSimulateAnalyze:
    data = BaseRequest().api_load(path_setting.GMAI_SIMULATE_ANALYZE_DATA)
    simulateanalyze_case, simulateanalyze_data = get_ids(data, "simulate_analyze")

    @pytest.mark.parametrize("param",simulateanalyze_data,ids=simulateanalyze_case)
    def test_plastic_analysis_v3(self,param):
        r = gmai_request().simulate_analyze(param["device_id"], param["image_url"], param["style_id"] ,param["type_id"])
        assert r["error"] == 0
        print("效果图:  ", r["data"]["plastic_image_url"])