Browse Source

我的用户信息

jialuyao 7 months ago
parent
commit
e20d8db0bf
2 changed files with 24 additions and 0 deletions
  1. 16 0
      cases/wxapi/登录/我的/myuser_information.py
  2. 8 0
      lib/wxapi.py

+ 16 - 0
cases/wxapi/登录/我的/myuser_information.py

@@ -0,0 +1,16 @@
+from hytest import *
+from lib.wxapi import apimgr
+class c1:
+    #测试用例名称
+    name='我的用户信息'
+    #测试步骤
+    def teststeps(self):
+        INFO('测试步骤')
+        STEP(1,'打印接口返回值')    #会出现在测试报告中
+        r = apimgr.myuser_information()
+        res = r.json()
+        INFO(res)
+        actural = res['error_code']
+        STEP(2,'第二步设置检查点')
+        #设置检查点
+        CHECK_POINT('检查app登录接口是否正常',actural == 0)

+ 8 - 0
lib/wxapi.py

@@ -76,4 +76,12 @@ class APIMgr():
         s = GSTORE['s']
         s.post(url=url, headers=headers)
 
+    """我的用户信息"""
+    def myuser_information(self):
+        hearders = GSTORE['headers']
+        s = GSTORE['s']
+        response = s.post(f"{cfg.target_host_wxapi}/debrisproduct/myinfo", headers=hearders)
+        return response
+
+
 apimgr = APIMgr()