@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+ #测试用例名称
+ name='情报列表'
+ #测试步骤
+ def teststeps(self):
+ INFO('测试步骤')
+ STEP(1, '第一步调用函数')
+ res = apimgr.information()
+ r = res.json()
+ INFO(r)
+ actural = r['data']['total']
+ STEP(2, '第二步设置检查点')
+ # 设置检查点
+ CHECK_POINT('检查用户中台接口是否正常', actural >= 0)
+ name='情报热词'
+ res = apimgr.information_buzzword()
+ actural = r['error_code']
+ CHECK_POINT('检查用户中台接口是否正常', actural == 0)
@@ -143,6 +143,24 @@ class APIMgr():
response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/search/buyPurposeSubscribeList", headers=hearders, json=json)
return response
+ """情报热词"""
+ def information_buzzword(self):
+ hearders = GSTORE['headers']
+ s = GSTORE['s']
+ response = s.get(f"{cfg.target_host_wxapi}/debrisproduct/info/getHotInfo", headers=hearders)
+ return response
+
+ """情报列表"""
+ def information(self):
+ json={
+ "page_size": 1,
+ "page_num": 1,
+ "keyWords": "科技"
+ }
+ response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/info/getInfoList", headers=hearders, json=json)
apimgr = APIMgr()