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 TestSkinUserHadTest:
    data = BaseRequest().api_load(path_setting.GMAI_SKIN_USER_HAD_TEST_DATA)
    skinhadtest_case, skinhadtest_data = get_ids(data, "skin_user_had_test")

    @pytest.mark.parametrize("param", skinhadtest_data, ids=skinhadtest_case)
    def test_skin_user_hadused(self, param):
        r = gmai_request().skin_user_had_test(param["device_id"])
        if r["error"] == 0:
            data = r.get("data").get("user_have_scan_skin")
            assert data is param["assert"]





