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 TestDeleteLiveService:
    data = BaseRequest().api_load(path_setting.DELETELIVESERVICE)
    deleteliveservice_case, deleteliveservice_data = get_ids(data, "delete_live_service")

    @pytest.mark.parametrize("param", deleteliveservice_data, ids=deleteliveservice_case)
    def test_delete_live_service(self, param):
        print(111111111111111111111)
        r = live_request().delete_live_service(param["channel_id"], param["live_service_id"], param["version"])
        if r["error"] == 0:
            assert r["data"]["toast"] == param["assert"]