import pytest

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


class TestServiceAll:

    service_all = BaseRequest().api_load(path_setting.SERVICEALL_DATA)
    ServiceAll_case, ServiceAll_data = get_ids(service_all, "service_all")

    @pytest.mark.parametrize("param",ServiceAll_data,ids=ServiceAll_case)
    def test_ServiceAll(self,param):

        r = web_request().service_all()
        print("=====",r)
        if r["error"] == 0:
            assert r["error"] == param["assert"]