Przeglądaj źródła

子部门,添加人员

jialuyao 7 miesięcy temu
rodzic
commit
9a36ca4371

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

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '添加人员'
+
+    def teststeps(self):
+        INFO('初始化方法')
+        STEP(1, '第一步调用函数')
+        res = apimgr.add_personnel()
+        resp = res.json()
+        error_code = resp['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查推送记录接口是否正常', error_code==0)

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

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '子部门'
+
+    def teststeps(self):
+        INFO('初始化方法')
+        STEP(1, '第一步调用函数')
+        res = apimgr.subdepartment()
+        resp = res.json()
+        error_code = resp['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查推送记录接口是否正常', error_code==0)

+ 22 - 0
lib/webapi.py

@@ -1076,6 +1076,28 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host_wxapi}/debrisproduct/getPriceList", headers=headers_1)
         return response
 
+    """子部门"""
+    def subdepartment(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data = {
+            "id":26741
+        }
+        response = s.post(f"{cfg.target_host}/entbase/department/childrens", headers=hearders, data=data)
+        return response
+
+    """添加人员"""
+    def add_personnel(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data = {
+            "name":"贾路瑶",
+            "phone":"19588533063",
+            "id":26741
+        }
+        response = s.post(f"{cfg.target_host}/entbase/person/add", headers=hearders, data=data)
+        return response
+
 apimgr = APIMgr()