liumiaomiao 2 년 전
부모
커밋
adc7c36166
3개의 변경된 파일17개의 추가작업 그리고 1개의 파일을 삭제
  1. BIN
      cases/登录功能/消息中心/__pycache__/messagelist.cpython-38.pyc
  2. 10 0
      cases/登录功能/消息中心/messagelist.py
  3. 7 1
      lib/webapi.py

BIN
cases/登录功能/消息中心/__pycache__/messagelist.cpython-38.pyc


+ 10 - 0
cases/登录功能/消息中心/messagelist.py

@@ -0,0 +1,10 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '消息中心列表'
+    def teststeps(self):
+        res=apimgr.get_messagelist()
+        actural=res.json()
+        # 设置检查点
+        CHECK_POINT('检查消息中心列表数据是否正常', actural['msg'] == '查询成功' and actural['status']==1)

+ 7 - 1
lib/webapi.py

@@ -166,7 +166,13 @@ class APIMgr():
         response =s.post(f"{cfg.target_host}/jyapi/jybx/buyer/eType/buyerList", headers=headers, json=data)
         # response.raise_for_status()  # 如果请求失败,会抛出异常
         return response
-
+    #消息中心列表
+    def get_messagelist(self):
+        headers = GSTORE['headers']
+        s = GSTORE['s']
+        response=s.post(f"{cfg.target_host}/jymessageCenter/messageList",headers=headers,params=
+                    {"needFilter":"1","msgType":"0","isRead":"-1","offset":"1","pageSize":"5"})
+        return response
 apimgr = APIMgr()