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 TestReplayMsg:
    data = BaseRequest().api_load(path_setting.REPLAY_MSG)
    replay_msg_case, replay_msg_data = get_ids(data,"replay_msg")

    @pytest.mark.parametrize("param", replay_msg_data, ids=replay_msg_case)
    def test_replay_msg(self, param):
        r = living_request().replay_msg(param["topic_id"], param["version"])
        if r["error"] == 0:
            assert r["data"]["245"][0]["type"] == param["assert"]
            print("看看直播回放的弹幕~")