Jelajahi Sumber

情报详情、订阅查询

jialuyao 7 bulan lalu
induk
melakukan
c8085a2986

+ 16 - 0
cases/fragmentation/登录/情报/information_details.py

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

+ 16 - 0
cases/fragmentation/登录/订阅/subscription_query.py

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

+ 20 - 0
lib/wxapi.py

@@ -205,6 +205,7 @@ class APIMgr():
         }
         response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/getBiddingDetail", headers=hearders, json=json)
         return response
+
     #获取订单详情
     def debrisproduct_orderDetail(self, orderCode):
         headers = GSTORE['headers']
@@ -227,4 +228,23 @@ class APIMgr():
             data={"orderCode": orderCode}
         )
 
+    """情报详情"""
+
+    def information_details(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json = {
+            "id":"61cbb70345a326c6c34a5e0e"
+        }
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/info/getInfoDetail", headers=hearders, json=json)
+        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
+
 apimgr = APIMgr()