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 TestAddLiveGift:
    data = BaseRequest().api_load(path_setting.ADDLIVEGIFT)
    addlivegift_case, addlivegift_data = get_ids(data, "add_live_gift")

    @pytest.mark.parametrize("param", addlivegift_data, ids=addlivegift_case)
    def test_add_live_gift(self, param):
        print(111111111111111111111)
        r = live_request().add_live_gift(param["channel_id"], param["doctor_gift_ids"], param["platform_gift_ids"], param["stream_id"],  param["version"])
        if r["error"] == 0:
            assert r["data"]["toast"] == param["assert"]
        live_request().delete_live_gift("739", "59127", "1", "4283", "7.45.0")