浏览代码

投标决策分析,项目名称联想、采购单位名称联想

jialuyao 9 月之前
父节点
当前提交
db4c55f598

+ 16 - 0
cases/pc/登录功能/投标决策分析/buyer_name_lenovo.py

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

+ 16 - 0
cases/pc/登录功能/投标决策分析/project_name_lenovo.py

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

+ 15 - 1
lib/webapi.py

@@ -902,7 +902,21 @@ class APIMgr():
         headers = GSTORE['headers']
         response = self.s.post(f"{cfg.target_host}/salesLeads/sampleReport", headers=headers, json={})
         return response
-
+    #项目名称联想
+    def project_name_lenovo(self):
+        headers = GSTORE['headers']
+        params = {"pName":[ "科技信息"]}
+        response = self.s.post(f"{cfg.target_host}/bigmember/analysis/projectName", headers=headers, params=params)
+        return response
+    #采购单位名称联想
+    def buyer_name_lenovo(self):
+        headers = GSTORE['headers']
+        params = {
+            "pName":[ "科技信息"],
+            "sType":1
+        }
+        response = self.s.post(f"{cfg.target_host}/bigmember/analysis/projectName", headers=headers, params=params)
+        return response
 
 apimgr = APIMgr()