lizhikun 1 жил өмнө
parent
commit
442eb33b1c

+ 16 - 0
cases/登录功能/密码校验/password_check.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+    name = '密码检查'
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1, '第一步调用函数')
+        res=apimgr.Check_password()
+        r = res.json()
+        INFO(r)
+
+        actural1=r['error_code']
+        STEP(2, '第二步设置检查点')
+        # 设置检查点
+        CHECK_POINT('检查用户信息',actural1 == 0)

+ 9 - 0
lib/webapi.py

@@ -370,6 +370,15 @@ class APIMgr():
         s = GSTORE['s']
         response = s.get(f"{cfg.target_host}/jypay/user/getAccountInfo", headers=headers)
         return response
+    #密码校验
+    def Check_password(self):
+        headers = GSTORE['headers']
+        s = GSTORE['s']
+        params = {
+            "password": "123456"
+        }
+        response = s.post(f"{cfg.target_host}/publicapply/password/check", headers=headers, params=params)
+        return response
 apimgr = APIMgr()