@@ -0,0 +1,14 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+ name = '关闭会话'
+ def teststeps(self):
+ INFO('测试步骤')
+ STEP(1, '第一步调用函数')
+ res = apimgr.close_chatsession()
+ actual = res.json()
+ error_code = actual["error_code"]
+ STEP(2, '第二步设置检查点')
+ # 设置检查点
+ CHECK_POINT('检查关闭会话是否正常',error_code == 0)
@@ -12,4 +12,4 @@ class c1:
count = actual["count"]
STEP(2, '第二步设置检查点')
# 设置检查点
- CHECK_POINT('检查创建会话是否正常',error_code == 0 and count == 0)
+ CHECK_POINT('检查聊天内容分页查询是否正常',error_code == 0 and count == 0)
@@ -1914,6 +1914,14 @@ class APIMgr():
}
response = self.s.post(f"{cfg.target_host}/jyapi/message/findMessage", headers=headers, json=json)
return response
+ #关闭会话
+ def close_chatsession(self):
+ headers = GSTORE['headers']
+ json = {
+ "sessionId": "475b435e514c0207"
+ }
+ response = self.s.post(f"{cfg.target_host}/jyapi/message/closeChatSession", headers=headers, json=json)
+ return response