Pārlūkot izejas kodu

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

# Conflicts:
#	lib/webapi.py
zangyamei 5 mēneši atpakaļ
vecāks
revīzija
f6e3f11c6c
3 mainītis faili ar 25 papildinājumiem un 3 dzēšanām
  1. 17 0
      cases/wx/登录功能/三级页/reward_text.py
  2. 2 1
      cfg/cfg.py
  3. 6 2
      lib/webapi.py

+ 17 - 0
cases/wx/登录功能/三级页/reward_text.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+class c1:
+    #测试用例名称
+    name='获取打赏标语'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'第一步调用函数')    #会出现在测试报告中
+        res = apimgr.reward_text()
+        status_code = res.status_code
+        STEP(stepNo=2, desc='第二步设置检查点')
+        # 检查响应状态码是否为 200
+        CHECK_POINT(desc='获取打赏标语是否正常', condition=status_code == 200 )
+
+
+

+ 2 - 1
cfg/cfg.py

@@ -1,4 +1,5 @@
 target_host = 'https://www.jianyu360.cn'
 target_host_app = 'https://app-a1.jianyu360.cn'
 target_host_api = 'https://api.jianyu360.com'
-target_host_wxapi = 'https://jy-applet.jianyu360.cn'
+target_host_wxapi = 'https://jy-applet.jianyu360.cn'
+target_host_wx = 'https://wx.jianyu360.cn'

+ 6 - 2
lib/webapi.py

@@ -1,6 +1,4 @@
 import json
-from http.client import responses
-
 import requests
 from hytest.common import *
 from pandas.io.formats.style import properties_args
@@ -1548,6 +1546,12 @@ class APIMgr():
         headers = GSTORE['headers']
         responses = self.s.post(f"{cfg.target_host}/entbase/behavior/show?departmentId=20365&page=1&pagesize=10&startTime=1738395151&endTime=1741017599",headers=headers)
         return responses
+    #微信端获取打赏标语
+    def reward_text(self):
+        headers = GSTORE['headers']
+        response = self.s.get(f"{cfg.target_host_wx}/front/rewardText", headers=headers)
+        return response
+
 
         # 添加使用人员
     def addUsePerson(self):