Commit 90828884 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent 0d632733
......@@ -36,12 +36,14 @@ result = requests.post(url, json=request_body, headers=headers)
# 获取接口响应时间
api_time = float(result.elapsed.total_seconds())
# 将接口响应时间添加至result
# 获取需求单列表信息
result = json.loads(result.content)
result = result["data"]["list"][0]
# 将接口响应时间添加至result
result["api_time"] = api_time
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict33")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_variable_exist(check_dict, result["data"]["list"][0])
commonFuc().check_variable_exist(check_dict, result)
......@@ -36,13 +36,15 @@ result = requests.get(url, params=request_body, headers=headers)
# 获取接口响应时间
api_time = float(result.elapsed.total_seconds())
# 将接口响应时间添加至result
# 获取需求单审核详情信息
result = json.loads(result.content)
result = result["data"][0]
# 将接口响应时间添加至result
result["api_time"] = api_time
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict42")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_variable_exist(check_dict, result["data"][0])
commonFuc().check_variable_exist(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