import pytest
from ids_list import get_ids
import path_setting
from all_backend_api.janus_live_request import live_request
from in_common.base_request import BaseRequest
class TestServicePageLiveEnter:
    data = BaseRequest().api_load(path_setting.SERVICE_PAGE_LIVE_ENTER)
    service_page_live_enter_case, service_page_live_enter_data = get_ids(data, "service_page_live_enter")

    @pytest.mark.parametrize("param",service_page_live_enter_data, ids=service_page_live_enter_case)
    def test_service_page_live_enter(self,param):
        r = live_request().service_page_live_enter(param["service_id"])
        if r["error"] == 0:
           assert r["error"] == param["assert"]

