@@ -0,0 +1,16 @@
+from hytest import *
+from lib.webapi import apimgr
+
+class c1:
+ name = '用户信息获取'
+ def teststeps(self):
+ INFO('测试步骤')
+ STEP(1, '第一步调用函数')
+ res=apimgr.Getuser()
+ r = res.json()
+ INFO(r)
+ actural = r['data']['phone']
+ actural1=r['error_code']
+ STEP(2, '第二步设置检查点')
+ # 设置检查点
+ CHECK_POINT('检查用户信息',actural=='18211989987' and actural1 == 0)
@@ -364,6 +364,12 @@ class APIMgr():
return response
"""标讯收藏"""
+ #信息获取
+ def Getuser(self):
+ headers = GSTORE['headers']
+ s = GSTORE['s']
+ response = s.get(f"{cfg.target_host}/jypay/user/getAccountInfo", headers=headers)
+ return response
apimgr = APIMgr()