import pytest

from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.user_request import user_request


class TestTopicFavor:
    data = BaseRequest().api_load(path_setting.TOPIC_FAVOR)
    topic_favor_case, topic_favor_data = get_ids(data, "favor")

    @pytest.mark.skip
    @pytest.mark.parametrize("param", topic_favor_data, ids=topic_favor_case)
    def test_topic_favor(self, param):
        # 收藏校验
        r = user_request().topic_favor()
        assert r["error"] == param["assert"]
        # 取消收藏校验
        r = user_request().topic_canclefavor()
        assert r["error"] == param["assert"]



