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 TestEnter:
    data = BaseRequest().api_load(path_setting.ENTER)
    enter_case, enter_data = get_ids(data,"enter")

    @pytest.mark.parametrize("param", enter_data, ids=enter_case)
    def test_enter(self, param):
        r = living_request().enter(param["channel_id"], param["from_source"], param["version"])
        print("观众进入直播间啦~~~")
        if r["error"] == 0:
            assert r["error"] == param["assert"]