ソースを参照

商机管理修改推送设置

liuyali@topnet.net.cn 6 ヶ月 前
コミット
d8038779aa
2 ファイル変更36 行追加0 行削除
  1. 21 0
      cases/pc/登录功能/订阅/entnichenew_pushset_update.py
  2. 15 0
      lib/webapi.py

+ 21 - 0
cases/pc/登录功能/订阅/entnichenew_pushset_update.py

@@ -0,0 +1,21 @@
+import json
+
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理-修改推送设置'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        res=apimgr.entnichenew_pushset_update()
+        actural =res.json()
+        error_code=actural["error_code"]
+        status=actural["data"]["status"]
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理修改推送设置是否正常',error_code == 0 and status == 1)
+
+
+

+ 15 - 0
lib/webapi.py

@@ -1243,6 +1243,21 @@ class APIMgr():
         }
         response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/infotype/update", headers=headers,json=json)
         return response
+    #商机管理-企业订阅-修改推送设置
+    def entnichenew_pushset_update(self):
+        headers = GSTORE['headers']
+        data = {
+            "ratemode": 2,
+            "apppush": 1,
+            "mailpush": 1,
+            "matchway": 2,
+            "wxpush": 1,
+            "matchmode": "title,detail",
+            "switch": 1,
+            "identity": "ent"
+        }
+        response = self.s.post(f"{cfg.target_host}/entnicheNew/subscribe/pushset/update", headers=headers,data=data)
+        return response