import pytest

from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web_request import web_request


class TestConversationDiary:
    data = BaseRequest().api_load(path_setting.CONVERSATIONDIARY)
    conversationdiary_case, conversationdiary_data = get_ids(data, "conversation_diary")


    @pytest.mark.parametrize("param",conversationdiary_data,ids=conversationdiary_case)
    def test_conversation_diary(self, param):
        '''点击发送案例按钮'''
        r = web_request().conversation_diary(param["doctor_user_id"])
        print(r)
        if r["error"] == 0:
            data = r.get("data", [])
            assert len(data) >= param["assert"]

