瀏覽代碼

验证数据导出邮箱验证码

123456 6 月之前
父節點
當前提交
e0c003c1bf
共有 2 個文件被更改,包括 26 次插入0 次删除
  1. 17 0
      cases/pc/登录功能/数据/check_mailverify.py
  2. 9 0
      lib/webapi.py

+ 17 - 0
cases/pc/登录功能/数据/check_mailverify.py

@@ -0,0 +1,17 @@
+from hytest import *
+from lib.webapi import apimgr
+
+
+class c1:
+    name = "验证数据导出邮箱验证码"
+    def teststeps(self):
+        INFO("测试步骤")
+        STEP(1,"第一步调用函数")
+        res = apimgr.check_mailverify() #调用函数webapi里的check_mailverify函数
+        r = res.json() #用json格式返回
+        actural = r["success"]
+        STEP(2,"设置检查点")
+        CHECK_POINT("输入错误的邮箱验证码,返回值若为False,则代表此接口调用成功",actural == False)
+
+
+

+ 9 - 0
lib/webapi.py

@@ -1164,6 +1164,15 @@ class APIMgr():
         response = self.s.post(f"{cfg.target_host}/front/dataExport/sendMailVerify",headers = headers , data = data)
         return response
 
+    #验证数据导出邮箱验证码
+    def check_mailverify(self):
+        headers = GSTORE["headers"]
+        data = {
+            "emailVerity" : "YQ09Z1",
+            "email" : "luwenna@topnet.net.cn"
+        }
+        response = self.s.post(f"{cfg.target_host}/front/dataExport/checkMailVerify", headers = headers ,data = data)
+        return  response
 apimgr = APIMgr()