Commit 7418a9eb authored by 张淑琴's avatar 张淑琴

恢复文件

parent e47fcf0b
import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request
class TestSendMsg:
data = BaseRequest().api_load(path_setting.SEND_MSG)
sendmsg_case, sendmsg_data = get_ids(data, "send_msg")
@pytest.mark.parametrize("param", sendmsg_data, ids=sendmsg_case)
def test_send_msg(self, param):
r = im_request().send_msg(param["conversation_id"], param["is_system"], param["referrer"], param["referrer_id"], param["msg_type"], param["content"], param["extra"])
print(r)
if r["error"] == 0:
assert r["data"]["conversation_type"] == param["assert_conversation_type"]
assert r["data"]["message_type"] == param["assert_message_type"]
if r["error"] == 1:
assert r["message"] == param["assert_message"]
send_msg:
#验证成功case
-
case: "给咨询师发送消息成功"
#current_city_id: beijing
conversation_id: 368
is_system: 0
referrer: "message_home"
referrer_id: ""
msg_type: 0
content: "您好,我想咨询一下---"
extra: ""
assert_conversation_type: 4
assert_message_type: 0
#验证失败case
-
case: "给咨询师发送消息失败"
#current_city_id: beijing
conversation_id: 463465
is_system: 0
referrer: "message_home"
referrer_id: ""
msg_type: 0
content: "您好,我想咨询一下---"
extra: {}
assert_message: "服务器开小差了~"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment