Pārlūkot izejas kodu

搜索和订阅入口,招标项目、采购意向搜索

jialuyao 7 mēneši atpakaļ
vecāks
revīzija
b6ea3c1d9c

+ 0 - 0
cases/wxapi/login_wxapi.py → cases/fragmentation/login_wxapi.py


+ 16 - 0
cases/fragmentation/搜索/bidding_project_search.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='招标项目搜索-搜索入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.bidding_project_search()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/搜索/purchase_intention_search.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='采购意向搜索-搜索入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.purchase_intention_search()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常', actural >= 0)

+ 0 - 0
cases/wxapi/登录/__st__.py → cases/fragmentation/登录/__st__.py


+ 0 - 0
cases/wxapi/登录/我的/myuser_information.py → cases/fragmentation/登录/我的/myuser_information.py


+ 16 - 0
cases/fragmentation/订阅/purchase_intention_subscription.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='采购意向搜索-订阅入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.purchase_intention_subscription()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常', actural >= 0)

+ 16 - 0
cases/fragmentation/订阅/tender_subscription.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='招标项目搜索-订阅入口'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.tender_subscription()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['total']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常', actural >= 0)

+ 61 - 0
lib/wxapi.py

@@ -83,5 +83,66 @@ class APIMgr():
         response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/myinfo", headers=hearders)
         return response
 
+    """招标项目搜索-搜索入口"""
+    def bidding_project_search(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "河南",
+            "propertyForm": "医院",
+            "OwnerType": "医疗单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "物业"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/bidList", headers=hearders, json=json)
+        return response
+
+    """采购意向搜索-搜索入口"""
+    def purchase_intention_search(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "安徽",
+            "propertyForm": "学校",
+            "OwnerType": "教育单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "数据"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/buyPurposeList", headers=hearders, json=json)
+        return response
+
+    """招标项目搜索-订阅入口"""
+    def tender_subscription(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "河南",
+            "propertyForm": "医院",
+            "OwnerType": "医疗单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "物业"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/bidSubscribeList", headers=hearders, json=json)
+        return response
+
+    """采购意向搜索-订阅入口"""
+    def purchase_intention_subscription(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+            "area": "安徽",
+            "propertyForm": "学校",
+            "OwnerType": "教育单位",
+            "Page": 1,
+            "PageSize": 1,
+            "KeyWords": "数据"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/buyPurposeSubscribeList", headers=hearders, json=json)
+        return response
+
+
 
 apimgr = APIMgr()