Procházet zdrojové kódy

详情页信息,采购单位分析

jialuyao před 7 měsíci
rodič
revize
76e2fe7042

+ 16 - 0
cases/fragmentation/登录/详情/detail_page_information.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='详情页信息'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.detail_page_information()
+        r = res.json()
+        INFO(r)
+        actural = r['data']['ErrorCode']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户中台接口是否正常', actural == 0)

+ 1 - 1
cases/fragmentation/登录/详情/detailed_information.py

@@ -2,7 +2,7 @@ from hytest import *
 from lib.wxapi import apimgr
 class c1:
     #测试用例名称
-    name='详情页信息'
+    name='详情页信息-投标'
     #测试步骤
     def teststeps(self):
         INFO('测试步骤')

+ 16 - 0
cases/fragmentation/登录/详情/purchasing_analysis.py

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

+ 23 - 3
lib/wxapi.py

@@ -196,7 +196,7 @@ class APIMgr():
         response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/monitorOperate", headers=hearders, json=json)
         return response
 
-    """详情页信息"""
+    """详情页信息-投标"""
     def detailed_information(self):
         hearders = GSTORE['headers']
         s = GSTORE['s']
@@ -229,7 +229,6 @@ class APIMgr():
         )
 
     """情报详情"""
-
     def information_details(self):
         hearders = GSTORE['headers']
         s = GSTORE['s']
@@ -240,11 +239,32 @@ class APIMgr():
         return response
 
     """订阅查询"""
-
     def subscription_query(self):
         hearders = GSTORE['headers']
         s = GSTORE['s']
         response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/userInfo", headers=hearders)
         return response
 
+    """采购单位分析"""
+    def purchasing_analysis(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "Id": "6683afb5fd2a955205279a0e",
+            "Type": 0
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/getBuyerAnalyze", headers=hearders, json=json)
+        return response
+
+    """详情页信息"""
+    def detail_page_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "Id": "ABCY1xZcDIvJyssAlV1cHU8CicoEjRjYWR1Pw4jIy4wc3xzfTNUCec%3D",
+            "Type":1
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/getDetailEquity", headers=hearders, json=json)
+        return response
+
 apimgr = APIMgr()