Commit 4dda6f8b authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent 24d7b545
......@@ -8,6 +8,7 @@ case_tag:cmdc_api,cmdc返利发放明细获取验证,2271,2271-38,sit,bs
from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
from common.db.db import mySql
import requests
import json
......@@ -38,3 +39,23 @@ result = json.loads(result.content)
check_dict = commonFuc().get_business_data(module, "checkDict33")
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# 获取返利发放明细
total = result["data"]["total"]
# print(total)
# 数据库操作
mysql_handle = mySql()
# 获取conf.ini文件中配置的数据库信息
host, port, user, pwd = mysql_handle.getConf(db="cmdc_db")
# 数据库查询返利发放规则状态
sql = "SELECT t.rebateTripId FROM `cmdc-order`.tc_rebatetrip t"
result = {"total": len(mysql_handle.selectSql(host, port, user, pwd, "cmdc-order", sql)[0])}
# print(result)
# 核验数据库返利发放规则对应的删除标识是否正确
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict33_1", total)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
......@@ -262,7 +262,7 @@ checkDict32: {"customerCode":"%s"}
"payload33": {"companyCode":null,"status":null,"rebateTheme":"","customerName":"","customerCode":"","productName":"","productCode":"","pageSize":10,"pageNum":1}
#预期结果
checkDict33: {"success":true,"code":"200"}
checkDict33_1: {"total":"%s"}
#测试场景三十六:列表查询条件验证_返利发放列表
"url34": "/order/public/rebatetrip/getList"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment