lizhikun il y a 1 an
Parent
commit
185fb3ad13

+ 16 - 0
cases/登录功能/用户中台/actionMode_commonlyList.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '常用功能列表获取'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.Commonly_List()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常',  actural == 0)

+ 16 - 0
cases/登录功能/用户信息获取/authorised_info.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '功能是否授权'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.Authorised_info()
+        r = res.json()
+        INFO(r)
+        actural=r['error_code']
+        # INFO(length)
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查权益中台是否正常',  actural == 0)

+ 18 - 0
lib/webapi.py

@@ -415,6 +415,24 @@ class APIMgr():
         s = GSTORE["s"]
         response =s.get(f"{cfg.target_host}/entnicheNew/buy/whetherbuy",headers=headers)
         return response
+
+    def Commonly_List(self):
+        headers = {
+            'content-Type': 'application/json',
+            'appId': '10000',
+            'userid': '63a41aa5cd7ea10389b2a8f3'
+        }
+        s = GSTORE['s']
+        response =s.post(f"{cfg.target_host}/userCenter/workDesktop/renew/commonlyList",headers=headers)
+        return response
+    def Authorised_info(self):
+        headers = {
+            "Content-Type":"application/json",
+            "functionCode":"znsj_kf_use"
+        }
+        s = GSTORE['s']
+        response =s.post(f"{cfg.target_host}/resourceCenter/waitEmpowerDetail",headers=headers)
+        return response
 apimgr = APIMgr()