Commit abab72b2 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent ce1409e6
......@@ -51,10 +51,18 @@ result = requests.get(url, params=request_body, headers=headers)
api_time = float(result.elapsed.total_seconds())
result = json.loads(result.content)
# 将接口响应时间添加至result
result["api_time"] = api_time
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict37")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
if result["data"]:
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict37_1")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
else:
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict37")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
......@@ -256,6 +256,7 @@ checkDict36: {"invoiceNo":"%s"}
"url37": "/order/public/invoice/express"
"payload37": {"invoiceNo":"%s"}
checkDict37: {"success":true,"code":"200","message":"未查询到数据","data":null,"freshToken":null}
checkDict37_1: {"success":true,"code":"200","message":"操作成功"}
#测试场景三十八:获取库存上报列表
"url38": "/cms/public/ls/getCustomerStockReportList"
......
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