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


class TestFinish:
    data = BaseRequest().api_load(path_setting.FINISH)
    finish_case, finish_data = get_ids(data,"finish")

    @pytest.mark.parametrize("param", finish_data, ids=finish_case)
    def test_finish(self, param):
        r = living_request().finish(param["channel_id"], param["version"])
        print("主播下播了，呜呜呜")
        if r["error"] == 0:
            assert r["error"] == param["assert"]