Sfoglia il codice sorgente

订阅推送记录(大会员、商机管理)

jialuyao 1 anno fa
parent
commit
ce22d6d99f

+ 15 - 0
cases/登录功能/订阅/bigmember_push.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='大会员推送记录列表'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.bigmember_push()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查大会员推送记录列表是否正常',actural ==0)

+ 15 - 0
cases/登录功能/订阅/entniche_push.py

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

+ 53 - 0
lib/webapi.py

@@ -504,6 +504,59 @@ class APIMgr():
         s = GSTORE['s']
         response =s.post(f"{cfg.target_host}/resourceCenter/waitEmpowerDetail",headers=headers)
         return response
+
+    """大会员推送记录列表"""
+    def bigmember_push(self):
+       headers = GSTORE['headers']
+       s = GSTORE['s']
+       response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/mType/list", headers=headers, json=
+       {
+        "pageNum": 1,
+        "pageSize": 50,
+        "format": "table",
+        "area": "",
+        "selectTime": "all",
+        "city": "",
+        "buyerClass": "",
+        "subtype": "",
+        "industry": "",
+        "keyWords": "",
+        "fileExists": "",
+        "price": "",
+        "source": "",
+        "exportNum": "",
+        "district": "",
+        "isRead": "",
+        "vt": "m"
+        })
+       return response
+
+    """商机管理推送记录列表"""
+    def entniche_push(self):
+       headers = GSTORE['headers']
+       s = GSTORE['s']
+       response = self.s.post(f"{cfg.target_host}/jyapi/jybx/subscribe/eType/list", headers=headers, json=
+       {
+        "pageNum": 1,
+        "pageSize": 50,
+        "format": "table",
+        "area": "",
+        "selectTime": "all",
+        "city": "",
+        "buyerClass": "",
+        "subtype": "",
+        "industry": "",
+        "keyWords": "",
+        "fileExists": "",
+        "price": "",
+        "source": "",
+        "exportNum": "",
+        "district": "",
+        "isRead": "",
+        "vt": "s"
+        })
+       return response
+
 apimgr = APIMgr()