import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.janus_live_request import live_request

class TestAudienceServices:
    data = BaseRequest().api_load(path_setting.AUDIENCE_SERVICES)
    audience_services_case, audience_services_data = get_ids(data, "audience_services")
    @pytest.mark.parametrize("param",audience_services_data, ids = audience_services_case)
    def test_audience_services(self,param):
        r = live_request().audience_services(param["stream_id"],param["channel_id"],param["offset"],param["size"])
        if r["error"] == 0:
            assert r["error"] == param["assert"]