Forráskód Böngészése

Merge remote-tracking branch 'origin/feature/v1.0.1' into feature/v1.0.1

123456 7 hónapja
szülő
commit
da1cd87da1
2 módosított fájl, 28 hozzáadás és 0 törlés
  1. 18 0
      cases/pc/登录功能/消息中心/message_markRead.py
  2. 10 0
      lib/webapi.py

+ 18 - 0
cases/pc/登录功能/消息中心/message_markRead.py

@@ -0,0 +1,18 @@
+from hytest import *
+from lib.webapi import apimgr
+import json
+
+class c1:
+    name = '点击查看消息消息状态修改成已读'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res = apimgr.get_markread()
+        resp = res.json()
+        error_code = resp['code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查未读消息状态修改成已读接口是否正常', error_code == 0)
+
+    def teardown(self):
+        INFO('清除方法')

+ 10 - 0
lib/webapi.py

@@ -359,6 +359,16 @@ class APIMgr():
         })
         return response
 
+    #点击查看消息消息状态修改成已读
+    def get_markread(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        json={
+           "msgId":285266
+         }
+        response = s.post(f"{cfg.target_host}/jyapi/messageCenter/markRead", headers=hearders,json=json)
+        return response
+
     """用户中台"""
     def get_userCenter(self):
         hearders = GSTORE['headers']