import pytest

from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.oneimage_request import oneimage_request

# 测颜值根据五官推荐美购
class TestRecomendServices:
    data = BaseRequest().api_load(path_setting.ONEIMAGE_RECOMEND_SERVICES_DATA)
    recomendservice_case, recomendservice_data = get_ids(data, "recomend_services")

    @pytest.mark.parametrize("param",recomendservice_data,ids=recomendservice_case)
    def test_recomend_services(self,param):
        r = oneimage_request().recomend_services(param["version"], param["business_tags_names"])
        assert r["error"] == param["assert"]


