Commit ec0ac742 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent 7cc3581e
......@@ -2,7 +2,7 @@
__author__ = "liguangyu"
"""
case_tag:cmdc_api,cmdc模糊查询客户信息,2290,2250-03,sit,bs
case_tag:cmdc_api,cmdc模糊查询客户信息_配货单列表,2290,2250-03,sit,bs
主数据平台:运营后台管理系统查询客户信息接口
"""
......@@ -30,7 +30,7 @@ request_body = commonFuc().get_business_data(module, "payload2", customer_random
"""
场景: 验证模糊查询客户信息接口连通性
用例名称:模糊查询客户信息
用例名称:模糊查询客户信息_配货单列表
输出:{"cusCompanyName":"%s"}
"""
# 发送请求
......@@ -38,13 +38,13 @@ result = requests.get(url, params=request_body, headers=headers)
# 获取接口响应时间
api_time = float(result.elapsed.total_seconds())
result = json.loads(result.content)
# print(result)
# 获取客户信息中cusCompanyName
result = {"cusCompanyName": result["data"][0]["cusCompanyName"][:2]}
result["api_time"] = api_time
print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2", customer_random)
# print(check_dict)
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
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