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 TestDeleteLiveGift:
    data = BaseRequest().api_load(path_setting.DELETEGIFT)
    deletelivegift_case, deletelivegift_data = get_ids(data, "delete_live_gift")

    @pytest.mark.parametrize("param", deletelivegift_data, ids=deletelivegift_case)
    def test_delete_live_gift(self, param):
        print(111111111111111111111)
        r = live_request().delete_live_gift(param["channel_id"], param["gift_id"], param["stream_id"], param["gift_type"], param["version"])
        if r["error"] == 0:
            assert r["data"]["toast"] == param["assert"]