import pytest

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

class TestRelatedService:
    data = BaseRequest().api_load(path_setting.TRACTATE_RELATED_SERVICE)
    related_service_case, related_service_data = get_ids(data, "related_service")

    # @pytest.mark.skip
    @pytest.mark.parametrize("param", related_service_data, ids=related_service_case)
    def test_related_service(self, param):
        r = tractate_request().tractate_related_service( param["current_city_id"], param["tractate_id"], param["data_type"] )
        print(r)
        assert r["error"] == 0
