Commit 6b138d7a authored by 张淑琴's avatar 张淑琴

注掉咨询师相关case

parent 57f51e2e
...@@ -6,13 +6,15 @@ class im_request(BaseRequest): ...@@ -6,13 +6,15 @@ class im_request(BaseRequest):
def __init__(self): def __init__(self):
self.data = self.api_load(path_setting.CONVERSATION_DETAIL_CONFIG) self.data = self.api_load(path_setting.CONVERSATION_DETAIL_CONFIG)
def conversation_detail(self, current_city_id, begin_msg_id, conversation_type, end_msg_id,referrer): #def conversation_detail(self, current_city_id, begin_msg_id, conversation_type, end_msg_id,referrer):
self.params["current_city_id"] = current_city_id #咨询师聊天详情页
self.params["begin_msg_id"] = begin_msg_id #self.params["current_city_id"] = current_city_id
self.params["conversation_type"] = conversation_type #self.params["begin_msg_id"] = begin_msg_id
self.params["end_msg_id"] = end_msg_id #self.params["conversation_type"] = conversation_type
self.params["referrer"] = referrer #self.params["end_msg_id"] = end_msg_id
return self.api_send(self.data["conversation_detail"]) #self.params["referrer"] = referrer
#return self.api_send(self.data["conversation_detail"])
#该接口已下线
def auto_msg(self, trace_id, conversation_id): def auto_msg(self, trace_id, conversation_id):
self.params["trace_id"] = trace_id self.params["trace_id"] = trace_id
...@@ -20,6 +22,7 @@ class im_request(BaseRequest): ...@@ -20,6 +22,7 @@ class im_request(BaseRequest):
return self.api_send(self.data["auto_msg"]) return self.api_send(self.data["auto_msg"])
def send_msg(self, conversation_id, is_system, referrer, referrer_id, msg_type, content, extra): def send_msg(self, conversation_id, is_system, referrer, referrer_id, msg_type, content, extra):
#给咨询师发送消息
self.params["conversation_id"] = conversation_id self.params["conversation_id"] = conversation_id
self.params["is_system"] = is_system self.params["is_system"] = is_system
self.params["referrer"] = referrer self.params["referrer"] = referrer
...@@ -28,6 +31,7 @@ class im_request(BaseRequest): ...@@ -28,6 +31,7 @@ class im_request(BaseRequest):
self.params["content"] = content self.params["content"] = content
self.params["extra"] = extra self.params["extra"] = extra
return self.api_send(self.data["send_msg"]) return self.api_send(self.data["send_msg"])
# 该接口已下线
def robot_get_second(self, page_type): def robot_get_second(self, page_type):
" 获取页面触发私信时间 " " 获取页面触发私信时间 "
...@@ -46,11 +50,10 @@ class im_request(BaseRequest): ...@@ -46,11 +50,10 @@ class im_request(BaseRequest):
if __name__ == '__main__': if __name__ == '__main__':
print(im_request().conversation_detail("beijing", 0, 4, 0, "message_home")) #print(im_request().conversation_detail("beijing", 0, 4, 0, "message_home"))
print("第二个接口")
print(im_request().auto_msg("2021/04/22/1722/70a1791606d5",368)) print(im_request().auto_msg("2021/04/22/1722/70a1791606d5",368))
print("send_msg") #print("send_msg")
print(im_request().send_msg("368", 0, "message_home", "", 0, "您好,我想咨询一下", {})) #print(im_request().send_msg("368", 0, "message_home", "", 0, "您好,我想咨询一下", {}))
print(im_request().robot_get_second("3")) print(im_request().robot_get_second("3"))
print(im_request().robot_send_msg("715368769fea4a1ba0c85979112ed154", 1, "3", "gengmei", 33909952, "7.46.0")) print(im_request().robot_send_msg("715368769fea4a1ba0c85979112ed154", 1, "3", "gengmei", 33909952, "7.46.0"))
......
...@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest ...@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request from all_backend_api.im_request import im_request
class TestConversationDetail: '''class TestConversationDetail:
data = BaseRequest().api_load(path_setting.CONVERSATION_DETAIL) data = BaseRequest().api_load(path_setting.CONVERSATION_DETAIL)
conversationdetail_case, conversationdetail_data = get_ids(data, "conversation_detail") conversationdetail_case, conversationdetail_data = get_ids(data, "conversation_detail")
...@@ -15,5 +15,5 @@ class TestConversationDetail: ...@@ -15,5 +15,5 @@ class TestConversationDetail:
r = im_request().conversation_detail(param["current_city_id"], param["begin_msg_id"], param["conversation_type"], param["end_msg_id"], param["referrer"]) r = im_request().conversation_detail(param["current_city_id"], param["begin_msg_id"], param["conversation_type"], param["end_msg_id"], param["referrer"])
if r["error"] == 0: if r["error"] == 0:
msg_list = r.get("data").get("msg_list",[]) msg_list = r.get("data").get("msg_list",[])
assert len(msg_list) > param["assert"] assert len(msg_list) > param["assert"]'''
...@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest ...@@ -6,7 +6,7 @@ from in_common.base_request import BaseRequest
from all_backend_api.im_request import im_request from all_backend_api.im_request import im_request
class TestSendMsg: '''class TestSendMsg:
data = BaseRequest().api_load(path_setting.SEND_MSG) data = BaseRequest().api_load(path_setting.SEND_MSG)
sendmsg_case, sendmsg_data = get_ids(data, "send_msg") sendmsg_case, sendmsg_data = get_ids(data, "send_msg")
...@@ -18,5 +18,5 @@ class TestSendMsg: ...@@ -18,5 +18,5 @@ class TestSendMsg:
assert r["data"]["conversation_type"] == param["assert_conversation_type"] assert r["data"]["conversation_type"] == param["assert_conversation_type"]
assert r["data"]["message_type"] == param["assert_message_type"] assert r["data"]["message_type"] == param["assert_message_type"]
if r["error"] == 1: if r["error"] == 1:
assert r["message"] == param["assert_message"] assert r["message"] == param["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