ソースを参照

采购单位画像数据、最新项目动态

jialuyao 6 ヶ月 前
コミット
bfa1ff7c1a

+ 16 - 0
cases/pc/登录功能/采购单位画像/latest_project_news.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='最新项目动态'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.latest_project_news()
+        res = r.json()
+        actural  = res['error_code']
+        actural1 = res['data']['count']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查最新项目动态是否正常',actural ==0 and actural1 >=0)

+ 16 - 0
cases/pc/登录功能/采购单位画像/prchasing_profile_data.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='采购单位画像数据'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        r = apimgr.prchasing_profile_data()
+        res = r.json()
+        actural  = res['error_code']
+        actural1 = res['data']['buyerclass']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查采购单位画像数据是否正常',actural ==0 and actural1 =="能源化工")

+ 23 - 0
lib/webapi.py

@@ -1382,6 +1382,29 @@ class APIMgr():
         response = s.get(f"{cfg.target_host_app}/entnicheNew/distribute/detail?id=67820b98e7364a57c3b7eaf5", headers=hearders, data=data)
         return response
 
+    """采购单位画像数据"""
+    def prchasing_profile_data(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params= {
+            "buyer":"黎明化工研究设计院有限责任公司",
+            "exactMatch":0
+        }
+        response = s.post(f"{cfg.target_host}/entnicheNew/portrait/buyer/getData", headers=hearders, params=params)
+        return response
+
+    """最新项目动态"""
+    def latest_project_news(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        params= {
+            "buyer":"黎明化工研究设计院有限责任公司",
+            "PageNum":1,
+            "pageSize":5
+        }
+        response = s.post(f"{cfg.target_host}/entnicheNew/portrait/buyer/getNewMsg", headers=hearders, params=params)
+        return response
+
 apimgr = APIMgr()