Browse Source

企业信息

jialuyao 6 months ago
parent
commit
27af6fb4a5

+ 1 - 1
cases/pc/登录功能/机构中心/add_personnel.py

@@ -13,4 +13,4 @@ class c1:
         error_code = resp['error_code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查推送记录接口是否正常', error_code==0)
+        CHECK_POINT('检查添加人员接口是否正常', error_code==0)

+ 17 - 0
cases/pc/登录功能/机构中心/enterprise_information.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '企业信息'
+
+    def teststeps(self):
+        INFO('初始化方法')
+        STEP(1, '第一步调用函数')
+        res = apimgr.enterprise_information()
+        resp = res.json()
+        error_code = resp['error_code']
+        actural = resp['data']['admin_system']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查企业信息接口是否正常', error_code==0 and actural==False)

+ 1 - 1
cases/pc/登录功能/机构中心/subdepartment.py

@@ -13,4 +13,4 @@ class c1:
         error_code = resp['error_code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查推送记录接口是否正常', error_code==0)
+        CHECK_POINT('检查企业子部门接口是否正常', error_code==0)

+ 1 - 1
cases/pc/登录功能/消息中心/messagelist.py

@@ -13,6 +13,6 @@ class c1:
         error_code = resp['code']
         STEP(2, '第二步设置检查点')
         # 设置检查点
-        CHECK_POINT('检查推送记录接口是否正常', error_code==0)
+        CHECK_POINT('检查消息中心列表接口是否正常', error_code==0)
     def teardown(self):
         INFO('清除方法')

+ 11 - 0
lib/webapi.py

@@ -1098,6 +1098,17 @@ class APIMgr():
         response = s.post(f"{cfg.target_host}/entbase/person/add", headers=hearders, data=data)
         return response
 
+    """企业信息"""
+    def enterprise_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params= {
+            "t":"1736561573400"
+        }
+        response = s.get(f"{cfg.target_host}/entbase/ent/entinfo", headers=hearders, params=params)
+        return response
+
+
 apimgr = APIMgr()