import pytest

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


class TestDetail:
    data = BaseRequest().api_load(path_setting.DOCTOR_DETAIL)
    detail_case, detail_data = get_ids(data, "detail")

    @pytest.mark.parametrize("param", detail_data, ids=detail_case)
    def test_detail(self, param):
        r = doctor_request().detail()

        if r["error"] == 0:
            assert r["error"] == param["assert_error"]
