import pytest

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


class TestMarkLiveService:
    data = BaseRequest().api_load(path_setting.MARK_LIVE_SERVICE)
    mark_live_service_case, mark_live_service_data = get_ids(data, "mark_live_service")

    @pytest.mark.parametrize("param", mark_live_service_data, ids=mark_live_service_case)
    def test_mark_live_service(self, param):
        print(111111111111111111111)
        r = live_request().mark_live_service(param["stream_id"], param["channel_id"], param["live_service_id"], param["mark_status"],  param["version"])
        if r["error"] == 0:
            assert r["data"]["toast"] == param["assert"]