import pytest

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


class TestDiaryVote:
    data = BaseRequest().api_load(path_setting.DIARY_VOTE)
    diary_vote_case, diary_vote_data = get_ids(data, "diary_vote")

    @pytest.mark.parametrize("param", diary_vote_data, ids=diary_vote_case)
    def test_api_topic_vote(self, param):
        r = hybrid_api_topic_request().diary_detail(param["topic_id"])
        assert r["error"] == param["assert1"]








