Commit a3e07a31 authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent ceb7d33b
...@@ -64,8 +64,14 @@ request_body = commonFuc().get_business_data(module, "payload21", customer_name, ...@@ -64,8 +64,14 @@ request_body = commonFuc().get_business_data(module, "payload21", customer_name,
# 发送请求 # 发送请求
result = requests.post(url, json=request_body, headers=headers) result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content) result = json.loads(result.content)
print(result) # print(result)
# 获取预期结果 if result["success"]:
check_dict = commonFuc().get_business_data(module, "checkDict21") # 获取预期结果
# 断言实际结果中是否包含预期结果的内容 check_dict = commonFuc().get_business_data(module, "checkDict21")
commonFuc().check_result(check_dict, result) # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
else:
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict22")
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
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