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 TestReplayInfo:
    data = BaseRequest().api_load(path_setting.REPLAY_INFO)
    replay_info_case, replay_info_data = get_ids(data,"replay_info")

    @pytest.mark.parametrize("param", replay_info_data, ids=replay_info_case)
    def test_replay_info(self, param):
        r = living_request().replay_info(param["topic_id"], param["version"])
        if r["error"] == 0:
            assert r["data"]["topic_id"] == param["assert"]
            print("看看直播回放咯")