import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.topic_request import topic_request


class TestT0HospitalList:
    data = BaseRequest().api_load(path_setting.TRACTATE_HOSIPITAL)
    to_hospital_list_case, to_hospital_list_data = get_ids(data,"to_hospital_list")

    @pytest.mark.parametrize("param", to_hospital_list_data, ids=to_hospital_list_case)
    def test_to_hospital_list(self,param):
        r = topic_request().to_hospital_list()
        assert r["error"] == 0
        assert len(r["data"]) > 0
        # if r["error"] == 0:
        #     assert r["data"]["result"] is True