Browse Source

客服工作台-话术列表、推送数据浏览状态修改-超级订阅用户

liuyali@topnet.net.cn 1 tuần trước cách đây
mục cha
commit
bdc903a4a8

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

@@ -0,0 +1,26 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    name = '客服工作台话术列表'
+    def setup(self):
+        INFO('切换用户身份到质量部测试企业下')
+        apimgr.Identity_list(0)
+        apimgr.Identity_switch()
+
+    def teardown(self):
+        INFO('将用户切回到闫培珠新版商机管理企业')
+        apimgr.Identity_list(1)
+        apimgr.Identity_switch()
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.commonphrases_classlist()
+        actual = res.json()
+        INFO(actual)
+        error_code = actual["error_code"]
+        classify = actual["data"][0]["classify"]
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查客服工作台-话术列表接口是否正常',error_code == 0 and classify !="")
+
+

+ 25 - 0
cases/pc/登录功能/订阅/pushdata_setread_vtype.py

@@ -0,0 +1,25 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    name = '超级订阅用户推送数据浏览状态修改'
+    def setup(self):
+        INFO('切换用户身份到个人身份下')
+        apimgr.Identity_list(8)
+        apimgr.Identity_switch()
+
+    def teardown(self):
+        INFO('将用户切回到闫培珠新版商机管理企业')
+        apimgr.Identity_list(1)
+        apimgr.Identity_switch()
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.pushdata_setread_vtype()
+        actual = res.json()
+        #INFO(actual)
+        error_code = actual["error_code"]
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查推送数据浏览状态修改-超级订阅用户接口是否正常',error_code == 0)
+
+

+ 22 - 4
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
@@ -2049,14 +2049,14 @@ class APIMgr():
     #获取订阅关键词-超级订阅用户
     def getkey_member(self):
         headers = GSTORE['headers']
-        data = {
+        params = {
             "isEnt": "false",
             "ent_buy_member": 0,
             "ent_buy_vip": 0,
             "powerSource": 0,
             "userPower": 0
         }
-        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/vType/getKey", headers=headers, data=data)
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/vType/getKey", headers=headers, params=params)
         return response
     #修改用户订阅设置-超级订阅用户
     def subscription_setting_update(self, area_data=None):
@@ -2136,6 +2136,24 @@ class APIMgr():
 }
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/vType/update", headers=headers, json=json)
         return response
+    #客服工作台-话术列表
+    def commonphrases_classlist(self):
+        headers = GSTORE['headers']
+        json={
+            "query": ""
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/knowledge/commonPhrase/commonPhrasesClassList", headers=headers, json=json)
+        return response
+    #推送数据浏览状态修改-超级订阅用户
+    def pushdata_setread_vtype(self):
+        headers = GSTORE['headers']
+        params={
+            "vsid": "69984499278",
+            "isEnt": "false"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/vType/setRead",headers=headers, params=params)
+        return response
+