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

商机管理分发设置列表、分发规则修改接口

jialuyao 6 hónapja
szülő
commit
5a5f6c16bf

+ 17 - 0
cases/pc/登录功能/订阅/distribution_list.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理分发设置列表'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.distribution_list()
+        res = r.json()
+        #INFO(res)
+        actural  = res['error_code']
+        actural1 = res['data']['subdis']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理分发设置列表是否正常',actural ==0 and actural1 ==0)

+ 17 - 0
cases/pc/登录功能/订阅/distribution_update.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理分发规则修改'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.distribution_update()
+        res = r.json()
+        #INFO(res)
+        actural  = res['error_code']
+        actural1 = res['data']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理分发规则修改接口是否正常',actural ==0 and actural1 ==1)

+ 25 - 0
lib/webapi.py

@@ -1108,6 +1108,31 @@ class APIMgr():
         response = s.get(f"{cfg.target_host}/entbase/ent/entinfo", headers=hearders, params=params)
         return response
 
+    """分发设置列表接口"""
+    def distribution_list(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        data= {
+            "identity":"ent"
+        }
+        response = s.get(f"{cfg.target_host}/entnicheNew/distribute/list", headers=hearders, data=data)
+        return response
+
+    """分发规则修改接口"""
+    def distribution_update(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json= {
+            "id": "67820b98e7364a57c3b7eaf5",
+            "buyerclass": ["财政"],
+            "items": ["测试分组"],
+            "persons": [96208],
+            "area": {"安徽": []},
+            "district": {},
+            "identity": "ent"
+        }
+        response = s.get(f"{cfg.target_host}/entnicheNew/distribute/update", headers=hearders, json=json)
+        return response
 
 apimgr = APIMgr()