liuyali@topnet.net.cn 2 týždňov pred
rodič
commit
00abfcad93

+ 15 - 0
cases/pc/登录功能/在线客服/conversationList.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '客服会话列表'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.conversationList()
+        actual = res.json()
+        error_code = actual["error_code"]
+        count = actual["count"]
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查客服会话列表是否正常',error_code == 0 and count >=0)

+ 12 - 2
lib/webapi.py

@@ -1,8 +1,8 @@
 import json
 import requests
 from hytest.common import *
-#from pandas.io.formats.style import properties_args
-#from sympy.physics.vector.printing import params
+from pandas.io.formats.style import properties_args
+from sympy.physics.vector.printing import params
 
 from cfg import cfg
 from bs4 import BeautifulSoup
@@ -2015,6 +2015,16 @@ class APIMgr():
             headers=headers
         )
         return response
+    #客服会话列表
+    def conversationList(self):
+        headers = GSTORE['headers']
+        json = {
+            "userType": 1,
+            "filtrationId": ""
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/message/conversationList", headers=headers, json=json)
+        return response
+
 
 
 apimgr = APIMgr()