import pytest

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


class TestServiceHospital:
    data = BaseRequest().api_load(path_setting.SERVICE_HOSPITAL)
    service_hospital_case, service_hospital_data = get_ids(data, "service_hospital")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", service_hospital_data, ids=service_hospital_case)
    def test_service_hospital(self, param):
        r = janus_request().service_hospital(param["offset"], param["sku_id"], param["size"], param["version"], param["current_city_id"], param["lat"], param["lng"])

        if r["error"] == 0:
            assert len(r["data"]["service_hospital_list"]) > param["assert"]
