Commit bf9fa052 authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

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