@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+ name = '拟在建搜索条件接口'
+ def teststeps(self):
+ INFO('测试步骤')
+ STEP(1, '第一步调用函数')
+ res=apimgr.conditions()#调用 apimgr 模块中的 conditions 方法
+ r = res.json()#将 API 响应内容解析为 JSON 格式,并存储在变量 r 中
+ INFO(r)#输出完整的 API 响应内容,方便调试和查看
+ actural=r['error_code']#actural:用来存储从 API响应的 JSON 数据中提取的 'error_code' 键对应的值
+ STEP(2, '第二步设置检查点')
+ # 设置检查点
+ CHECK_POINT('拟在建搜索条件接口是否正常', actural == 0 )#断言检查,设置了一个检查点,用来验证 'error_code' 是否等于 0
@@ -1057,6 +1057,12 @@ class APIMgr():
response = self.s.post(f"{cfg.target_host}/jyapi/messageCenter/messageDetail",headers=header,json=data)
return response
+ #拟在建搜索条件接口
+ def conditions(self):
+ header = GSTORE['headers']
+ response = self.s.post(f"{cfg.target_host}/front/project/nzj/conditions",headers=header)
+ return response
# 工作桌面商机情报列表
def workdesk_intelligence(self):
header = GSTORE['headers']