@@ -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)
@@ -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()