Commit 8d1f2c82 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent de11c189
...@@ -9,7 +9,6 @@ case_tag:cmdc_api,cmdc查询待配货明细列表,2295,2295-122,sit,bs ...@@ -9,7 +9,6 @@ case_tag:cmdc_api,cmdc查询待配货明细列表,2295,2295-122,sit,bs
from common.common_func import commonFuc from common.common_func import commonFuc
from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin from air_case.cmdc_login.后台管理系统登录.后台管理系统登录 import CmdcDoLogin
import requests import requests
import random
import json import json
...@@ -28,7 +27,7 @@ request_body = commonFuc().get_business_data(module, "payload118") ...@@ -28,7 +27,7 @@ request_body = commonFuc().get_business_data(module, "payload118")
# 发送请求 # 发送请求
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)
# 获取欠货信息 # 获取欠货信息
for i in result["data"]["queryDemandPageInfo"]["list"]: for i in result["data"]["queryDemandPageInfo"]["list"]:
if i["debtSign"] == 0 and i["pushSign"] == 1: if i["debtSign"] == 0 and i["pushSign"] == 1:
...@@ -44,16 +43,12 @@ for i in result["data"]["queryDemandPageInfo"]["list"]: ...@@ -44,16 +43,12 @@ for i in result["data"]["queryDemandPageInfo"]["list"]:
# 获取接口响应时间 # 获取接口响应时间
api_time = float(result.elapsed.total_seconds()) api_time = float(result.elapsed.total_seconds())
# 获取配货信息
result = json.loads(result.content)
# print(result)
result = {"demandSubCode": result["data"][0]["distributionJdeDsCode"]}
# 将接口响应时间添加至结果中 # 将接口响应时间添加至结果中
result = json.loads(result.content)
result["api_time"] = api_time result["api_time"] = api_time
# 获取预期结果 # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict122", demandSubCode) check_dict = commonFuc().get_business_data(module, "checkDict122")
# print(check_dict) # print(check_dict)
# 断言实际结果中是否包含预期结果的内容 # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result) commonFuc().check_result(check_dict, result)
...@@ -62,5 +57,5 @@ for i in result["data"]["queryDemandPageInfo"]["list"]: ...@@ -62,5 +57,5 @@ for i in result["data"]["queryDemandPageInfo"]["list"]:
场景: 查询待配货明细列表 场景: 查询待配货明细列表
用例名称:查询待配货明细列表 用例名称:查询待配货明细列表
输出:{"demandSubCode":"%s"} 输出:{"success":true,"code":"200","message":"OK"}
""" """
\ No newline at end of file
...@@ -805,7 +805,7 @@ checkDict121: {"demandId":"%s"} ...@@ -805,7 +805,7 @@ checkDict121: {"demandId":"%s"}
"url122": "/order/public/queryDistributeList" "url122": "/order/public/queryDistributeList"
"payload122": {"demandSubCode":"%s","distributionType":"%s"} "payload122": {"demandSubCode":"%s","distributionType":"%s"}
#预期结果 #预期结果
checkDict122: {"demandSubCode":"%s"} checkDict122: {"success":true,"code":"200","message":"OK"}
#测试场景123:商品清单筛选功能验证_欠货详情 #测试场景123:商品清单筛选功能验证_欠货详情
"url123": "/order/debtDetail" "url123": "/order/debtDetail"
......
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