@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+ name = '聊天内容分页查询'
+ def teststeps(self):
+ INFO('测试步骤')
+ STEP(1, '第一步调用函数')
+ res = apimgr.findmessage()
+ actual = res.json()
+ error_code = actual["error_code"]
+ count = actual["count"]
+ STEP(2, '第二步设置检查点')
+ # 设置检查点
+ CHECK_POINT('检查创建会话是否正常',error_code == 0 and count == 0)
@@ -1900,6 +1900,20 @@ class APIMgr():
}
response = self.s.post(f"{cfg.target_host}/jyapi/message/createChatSession", headers=headers, json=json)
return response
+ #聊天内容分页查询
+ def findmessage(self):
+ headers = GSTORE['headers']
+ json = {
+ "userType": 2,
+ "msgType": 5,
+ "pageSize": 20,
+ "pageIndex": 1,
+ "sendId": "465d475c52",
+ "lastId": "0",
+ "sort": "asc"
+ }
+ response = self.s.post(f"{cfg.target_host}/jyapi/message/findMessage", headers=headers, json=json)
+ return response