Commit bf9fa052 authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent b5041abc
......@@ -32,18 +32,22 @@ result = json.loads(result.content)
# 生成随机数
flow_random = random.randint(0, len(result["data"]["list"]) - 1)
# 获取超发记录信息
custData = result["data"]["list"][flow_random]["customerCode"]
productData = result["data"]["list"][flow_random]["productName"]
demandCode = result["data"]["list"][flow_random]["demandCode"]
distributionCode = result["data"]["list"][flow_random]["distributionCode"]
startTime = result["data"]["list"][flow_random]["createTime"][:10] + " 00:00:00"
endTime = str(datetime.datetime.now().strftime("%Y-%m-%d")) + " 00:00:00"
custData = (
result["data"]["list"][flow_random]["customerCode"] if result["data"]["list"][flow_random]["customerCode"] else "")
productData = (
result["data"]["list"][flow_random]["productName"] if result["data"]["list"][flow_random]["productName"] else "")
demandCode = (
result["data"]["list"][flow_random]["demandCode"] if result["data"]["list"][flow_random]["demandCode"] else "")
distributionCode = (result["data"]["list"][flow_random]["distributionCode"] if result["data"]["list"][flow_random][
"distributionCode"] else "")
startTime = ""
endTime = ""
# 第三步进行列表查询条件验证
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url15")
request_body = commonFuc().get_business_data(module, "payload15", custData, productData, demandCode,
distributionCode, startTime, endTime)
# print(request_body)
"""
场景: 列表查询条件验证_超发记录
......
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