import pytest

import path_setting
from all_doctor_api.glmer_request import glmer_request
from ids_list import get_ids
from in_common.base_request import BaseRequest


class TestServiceDetail:
    service_detail = BaseRequest().api_load(path_setting.DETAIL_DATA)
    ServiceDetail_case, ServiceDetail_data = get_ids(service_detail, "service_detail")

    @pytest.mark.parametrize("params",ServiceDetail_data,ids=ServiceDetail_case)
    def test_ServiceDetail(self,params):

        r =glmer_request().service_detail()
        print("------",r)
        if r["code"] == 0:
            assert r["code"] == params["assert"]