Commit 40dad858 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent dce916d8
......@@ -25,6 +25,7 @@ headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_toke
# 第二步获取返利发放明细
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url33")
request_body = commonFuc().get_business_data(module, "payload33")
"""
场景: 验证返利发放明细查询接口是否可正常使用
用例名称:返利发放明细获取验证
......@@ -36,7 +37,7 @@ result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = float(result.elapsed.total_seconds())
result = json.loads(result.content)
result["api_time"] = api_time
# print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict33")
......@@ -45,7 +46,7 @@ commonFuc().check_result(check_dict, result)
# 获取返利发放明细
total = result["data"]["total"]
result["api_time"] = api_time
# 数据库操作
mysql_handle = mySql()
# 获取conf.ini文件中配置的数据库信息
......@@ -56,7 +57,6 @@ sql = "SELECT t.rebateTripId FROM `cmdc-order`.tc_rebatetrip t"
result = {"total": len(mysql_handle.selectSql(host, port, user, pwd, "cmdc-order", sql))}
result["api_time"] = api_time
# print(result)
# 核验数据库返利发放规则对应的删除标识是否正确
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict33_1", total)
# 断言实际结果中是否包含预期结果的内容
......
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