import pytest

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


class TestConversationRobotCleanMessage:
    data = BaseRequest().api_load(path_setting.ROBOTCLEANMESSAGE)
    robot_clean_message_case, robot_clean_message_data = get_ids(data, "conversation_robot_clean_message")


    @pytest.mark.parametrize("param",robot_clean_message_data,ids=robot_clean_message_case)
    def test_conversation_robot_clean_message(self, param):
        '''私信机器人-添加私信配置'''
        r = web3_request().conversation_robot_clean_message(param["doctor_user_id"], param["csrfmiddlewaretoken"])
        if r["error"] == 0:
            assert r["message"] == param["assert"]
