|
@@ -0,0 +1,32 @@
|
|
|
|
+import json
|
|
|
|
+
|
|
|
|
+from hytest import *
|
|
|
|
+from lib.webapi import apimgr
|
|
|
|
+class c1:
|
|
|
|
+ #测试用例名称
|
|
|
|
+ name='免费用户采购单位搜索'
|
|
|
|
+ #单个用例初始化
|
|
|
|
+ def suite_setup(self):
|
|
|
|
+ INFO('切换用户身份到免费企业下')
|
|
|
|
+ apimgr.Identity_list(7)
|
|
|
|
+ apimgr.Identity_switch()
|
|
|
|
+ #测试步骤
|
|
|
|
+ def teststeps(self):
|
|
|
|
+ INFO('测试步骤')
|
|
|
|
+ STEP(1,'第一步调用函数') #会出现在测试报告中
|
|
|
|
+ res = apimgr.buyersearch_free()
|
|
|
|
+ actual = res.json()
|
|
|
|
+ error_code = actual["error_code"]
|
|
|
|
+ STEP(stepNo=2, desc='第二步设置检查点')
|
|
|
|
+ CHECK_POINT(desc='免费用户采购单位搜索是否正常', condition=error_code == 0)
|
|
|
|
+ #单个用例清除
|
|
|
|
+ def suite_teardown(self):
|
|
|
|
+ INFO('将用户切回到闫培珠新版商机管理企业')
|
|
|
|
+ apimgr.Identity_list(1)
|
|
|
|
+ apimgr.Identity_switch()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|