Эх сурвалжийг харах

商机管理用户剑鱼标讯搜索、采购单位画像关联数据

liuyali@topnet.net.cn 5 сар өмнө
parent
commit
3667e9416f

+ 22 - 0
cases/pc/登录功能/搜索功能/search_business.py

@@ -0,0 +1,22 @@
+import json
+
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理用户招标搜索'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        res = apimgr.search_business()
+        actual = res.json()
+        error_code = actual["error_code"]
+        islimit = actual["data"]["isLimit"]
+        STEP(stepNo=2, desc='第二步设置检查点')
+        CHECK_POINT(desc='商机管理用户招标搜索是否正常', condition=error_code == 0 and islimit ==1)
+
+
+
+
+

+ 19 - 0
cases/pc/登录功能/采购单位画像/relate_information.py

@@ -0,0 +1,19 @@
+
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='采购单位画像关联数据'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        res = apimgr.relate_information()
+        actual = res.json()
+        error_code = actual["error_code"]
+        STEP(stepNo=2, desc='第二步设置检查点')
+        CHECK_POINT(desc='采购单位画像关联数据是否正常', condition=error_code == 0)
+
+
+
+

+ 39 - 0
lib/webapi.py

@@ -1609,6 +1609,45 @@ class APIMgr():
         }
         }
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/buyer/vType/buyerList", headers=headers, json=json)
         response = self.s.post(f"{cfg.target_host}/jyapi/jybx/buyer/vType/buyerList", headers=headers, json=json)
         return response
         return response
+    #招标搜索-商机管理用户
+    def search_business(self):
+        headers = GSTORE['headers']
+        json = {
+            "searchGroup": 0,
+            "reqType": "lastNews",
+            "pageNum": 1,
+            "pageSize": 50,
+            "keyWords": "软件",
+            "searchMode": 0,
+            "bidField": "",
+            "publishTime": "1709616424-1741152424",
+            "selectType": "title,content",
+            "subtype": "",
+            "exclusionWords": "",
+            "buyer": "",
+            "winner": "",
+            "agency": "",
+            "industry": "",
+            "province": "",
+            "city": "",
+            "district": "",
+            "buyerClass": "",
+            "fileExists": "",
+            "price": "",
+            "buyerTel": "",
+            "winnerTel": ""
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/core/eType/searchList", headers=headers, json=json)
+        return response
+    #采购单位画像-关联数据
+    def relate_information(self):
+        headers = GSTORE['headers']
+        json = {
+            "buyer": "上饶市广信区兴园学校",
+            "area": "江西"
+        }
+        response = self.s.post(f"{cfg.target_host}/jyapi/jybx/buyer/relates/information", headers=headers, json=json)
+        return response
 
 
 apimgr = APIMgr()
 apimgr = APIMgr()