فهرست منبع

Merge branch 'feature/v1.0.0' of https://jygit.jydev.jianyu360.cn/Test/jianyu_auto_api into feature/v1.0.0

# Conflicts:
#	.idea/encodings.xml
#	lib/webapi.py
liumiaomiao 1 سال پیش
والد
کامیت
c54bd561e1
6فایلهای تغییر یافته به همراه48 افزوده شده و 8 حذف شده
  1. 7 0
      .idea/encodings.xml.bak
  2. 1 1
      .idea/example.iml
  3. 1 1
      .idea/misc.xml
  4. 15 0
      cases/登录功能/订阅/bigmember_push.py
  5. 15 0
      cases/登录功能/订阅/entniche_push.py
  6. 9 6
      lib/webapi.py

+ 7 - 0
.idea/encodings.xml.bak

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$/cases/未登录功能/链接验证/check_pc_title.py" charset="UTF-8" />
+    <file url="file://$PROJECT_DIR$/cases/登录功能/链接验证/check_pc_purchase_intention.py" charset="UTF-8" />
+  </component>
+</project>

+ 1 - 1
.idea/example.iml

@@ -2,7 +2,7 @@
 <module type="PYTHON_MODULE" version="4">
   <component name="NewModuleRootManager">
     <content url="file://$MODULE_DIR$" />
-    <orderEntry type="jdk" jdkName="Python 3.8 (venv)" jdkType="Python SDK" />
+    <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
   </component>
 </module>

+ 1 - 1
.idea/misc.xml

@@ -3,5 +3,5 @@
   <component name="Black">
     <option name="sdkName" value="Python 3.11" />
   </component>
-  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11" project-jdk-type="Python SDK" />
+  <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (venv)" project-jdk-type="Python SDK" />
 </project>

+ 15 - 0
cases/登录功能/订阅/bigmember_push.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='大会员推送记录列表'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.bigmember_push()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查大会员推送记录列表是否正常',actural ==0)

+ 15 - 0
cases/登录功能/订阅/entniche_push.py

@@ -0,0 +1,15 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='商机管理推送记录列表'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.entniche_push()
+        res = r.json()
+        actural  = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查商机管理推送记录列表是否正常',actural ==0 )

+ 9 - 6
lib/webapi.py

@@ -127,8 +127,9 @@ class APIMgr():
         self.printResponse(response)
         return response
 
-    # 供应搜索
-    def supplySearch(self, keywords="PH计", searchType="title", province="", city="", time="", status="0",pageSize=50, pageIndex=1):
+        # 供应搜索
+    def supplySearch(self, keywords="PH计", searchType="title", province="", city="", time="", status="0",
+                         pageSize=50, pageIndex=1):
         headers = GSTORE['headers']
         headers['Content-Type'] = 'application/json'  # 添加Content-Type头部
         url = f"{cfg.target_host}/jyinfo/supplySearch"
@@ -148,7 +149,8 @@ class APIMgr():
         return response
 
     #采购单位搜索
-    def buyersousuo(self, buyerName, province=None, city=None, buyerClass=None, isCheckFollow=True, isCheckReceive=True,isContact=0, pageSize=10, pageNum=1):
+    def buyersousuo(self, buyerName, province=None, city=None, buyerClass=None, isCheckFollow=True, isCheckReceive=True,
+                    isContact=0, pageSize=10, pageNum=1):
         if buyerClass is None:
             buyerClass = []
         if city is None:
@@ -497,12 +499,12 @@ class APIMgr():
         return response
 
     def Identity_switch(self):
-        headers = GSTORE["headers"]
+        headers = GSTORE['headers']
         s = GSTORE["s"]
         params = {
             "token":self.token
-        }
-        response =s.post(f"{cfg.target_host}/publicapply/identity/switch", headers=self.headers,params=params)
+            }
+        response =s.post(f"{cfg.target_host}/publicapply/identity/switch", headers=headers, params=params)
         return response
     def User_info(self):
         headers = {
@@ -514,6 +516,7 @@ class APIMgr():
         params = {}
         response =s.post(f"{cfg.target_host}/userCenter/ent/userInfo",headers=headers,params=params)
         return response
+
     def Whether_buy(self):
         headers = GSTORE["headers"]
         s = GSTORE["s"]