jialuyao 3 долоо хоног өмнө
parent
commit
61c65559ef

+ 16 - 0
cases/pc/登录功能/订阅/user_information_push.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='推送用户信息获取'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.user_information_push()
+        res = r.json()
+        actural  = res['error_code']
+        actural1 = res['data']['appUrl']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查推送用户信息获取是否正常',actural ==0 and actural1 =="/front/downloadJyApp/qr?page=push_set&source=pc-pushsettings")

+ 20 - 2
lib/webapi.py

@@ -1956,9 +1956,27 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/fType/getKey", headers=headers, params=params)
         return response
 
-    """"""
-
+    """推送数据浏览状态修改-免费用户"""
+    def keywords_free(self):
+        headers = GSTORE['headers']
+        params = {
+            "isEnt":"false",
+            "ent_buy_member":0,
+            "ent_buy_vip":0,
+            "powerSource":0,
+            "userPower":1
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/fType/getKey", headers=headers, params=params)
+        return response
 
+    """推送用户信息获取"""
+    def user_information_push(self):
+        headers = GSTORE['headers']
+        json = {
+            "serviceType": "pc"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/getUser", headers=headers, json=json)
+        return response
 
 apimgr = APIMgr()