Commit 76bd6082 authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent d42ad665
......@@ -73,10 +73,17 @@ request_body = commonFuc().get_business_data(module, "payload30", buyercart_id_1
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content)
if result["data"]:
# # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2")
# # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# print(result)
if result["success"]:
if result["data"]:
# # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2")
# # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
else:
print("下单失败")
else:
print("下单失败")
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2_1")
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
This diff is collapsed.
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