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 TestDanmuV2:
    data = BaseRequest().api_load(path_setting.DANMU_V2)
    danmuv2_case, danmuv2_data = get_ids(data, "danmu_v2")

    @pytest.mark.skip
    @pytest.mark.parametrize("param",danmuv2_data,ids=danmuv2_case)
    def test_danmu_v2(self,param):
        print(param)
        r = living_request().danmu_v2(param["channel_id"],param["msg_id"],param["user_id"])
        if r["error"] == 0:
            assert r["error"] == param["assert"]
        else:
            assert r["message"] == param["assert_message"]