lizhikun 6 mesiacov pred
rodič
commit
45be985e8a

+ 0 - 1
cases/pc/未登录功能/对外接口/bid_search_api.py

@@ -9,7 +9,6 @@ class c2:
         STEP(1,'第一步调用函数')    #会出现在测试报告中
         res = apimgr.bid_search_api()
         actural = res.json()
-        INFO(actural)
         error_msg = actural["error_msg"]
         page_count = actural["data"]["pageCount"]
         STEP(2,'第二步设置检查点')

+ 2 - 2
cases/pc/登录功能/商机管理客户关注/customer_attention.py

@@ -10,7 +10,7 @@ class c2:
         res = apimgr.customer_attention()
         actural = res.json()
         INFO(actural)
-        limit_count=actural["data"]["limit_count"]
+        limit_count=actural["error_code"]
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('商机管理用户关注接口是否正常',limit_count>0)
+        CHECK_POINT('商机管理用户关注接口是否正常',limit_count == 0)

+ 13 - 5
cases/pc/登录功能/数据/sievedata.py

@@ -1,14 +1,22 @@
 from hytest import *
 from lib.webapi import apimgr
 
+
 class c1:
     name = "数据导出筛选预览数据"
+
     def teststeps(self):
         INFO("测试步骤")
-        STEP(1,"第一步调用函数")
+        STEP(1, "第一步调用函数")
         res = apimgr.preview_sievedata()
-        r = res.json()#用json格式返回
-        actural = r['data']['total']
-        STEP(2,"设置检查点")
-        CHECK_POINT("输入接口调用成功", actural >=1 )
+        r = res.json()  # 用json格式返回
+        INFO(r)
+
+        # 获取数据中的 _id 字段
+        data_list = r['data']['list']
 
+        # STEP 2: 检查 _id 是否存在
+        STEP(2, "检查 _id 字段是否存在")
+        for item in data_list:
+            _id = item.get('_id')  # 获取 _id 字段
+            CHECK_POINT(f"检查 _id 字段存在: {_id is not None}", _id is not None)

+ 1 - 1
cases/pc/登录功能/订阅/keywords_get.py

@@ -15,7 +15,7 @@ class c1:
         status = actural['data']['status']
         STEP(2,'第二步设置检查点')
         #设置检查点
-        CHECK_POINT('检查商机管理获取关键词设置是否正常',error_code == 0 and status == 1)
+        CHECK_POINT('检查商机管理获取关键词设置是否正常',error_code == 0 )