@@ -0,0 +1,10 @@
+from hytest import *
+from lib.webapi import apimgr
+def suite_setup():
+ INFO('切换用户身份到剑鱼物业专版测试企业下')
+ apimgr.Identity_list(6)
+ apimgr.Identity_switch()
+def suite_teardown():
+ INFO('将用户切回到闫培珠新版商机管理企业')
+ apimgr.Identity_list(1)
@@ -0,0 +1,16 @@
+import json
+
+class c1:
+ name = '我认领的经销商'
+ def teststeps(self):
+ INFO('初始化方法')
+ STEP(1, '第一步调用函数')
+ res = apimgr.distributor() #调用了apimgr对象的distributor()方法,并将返回结果存储在变量res中
+ resp = res.json() #res是一个HTTP响应对象,使用.json()方法将其内容解析为JSON格式。然后将解析后的结果赋值给变量resp
+ error_code = resp['error_code'] #从resp字典中提取出error_code字段的值。通常,error_code用于表示操作的结果状态
+ STEP(2, '第二步设置检查点')
+ # 设置检查点
+ CHECK_POINT('检查我认领的经销商接口是否正常', error_code==0)
@@ -1435,7 +1435,11 @@ class APIMgr():
response = self.s.post(f"{cfg.target_host}/front/wx_dataExport/searchExport", headers=hearders,data=data)
return response
-
+#我认领的经销商
+ def distributor(self):
+ header = GSTORE['headers']
+ response = self.s.post(f"{cfg.target_host}/jyapi/domain/claim/distributor",headers=header)
+ return response
apimgr = APIMgr()