Forráskód Böngészése

用户信息设置、推送设置修改

liuyali@topnet.net.cn 2 hete
szülő
commit
19e2e76ef5

+ 14 - 0
cases/pc/登录功能/订阅/setpushset.py

@@ -0,0 +1,14 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '推送设置修改'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.setpushset()
+        actual = res.json()
+        error_code = actual["error_code"]
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查推送设置修改是否正常',error_code == 0)

+ 14 - 0
cases/pc/登录功能/订阅/user_information_set.py

@@ -0,0 +1,14 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '推送用户信息设置'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.user_information_set()
+        actual = res.json()
+        error_code = actual["error_code"]
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查推送用户信息设置是否正常',error_code == 0)

+ 22 - 0
lib/webapi.py

@@ -2024,6 +2024,28 @@ class APIMgr():
         }
         response = self.s.post(f"{cfg.target_host}/jyapi/message/conversationList", headers=headers, json=json)
         return response
+    #推送设置修改
+    def setpushset(self):
+        headers = GSTORE['headers']
+        json = {
+            "item": "o_subset",
+            "setType": "a_times",
+            "ratemode": 2,
+            "times": [
+                "09:00",
+                "14:00"
+            ]
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/setPushSet", headers=headers, json=json)
+        return response
+    #推送用户信息设置
+    def user_information_set(self):
+        headers = GSTORE['headers']
+        json = {
+            "mail": "2011537664@qq.com"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/setUser", headers=headers, json=json)
+        return response