import pytest

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


class TestReply:
    data = BaseRequest().api_load(path_setting.DIARY_COMMON_REPLY)
    diary_common_reply_case, diary_common_reply_data = get_ids(data, "common_reply")

    @pytest.mark.parametrize("param", diary_common_reply_data, ids=diary_common_reply_case)
    def test_reply(self, param):
        # 日记贴的评论列表
        r = common_request().diary_common_reply(param["id"], param["type"],param["start_num"])
        print("返回结果", r)
        assert r["error"] == 0




