Commit e6fb4606 authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent f5069127
......@@ -50,7 +50,7 @@ transaction_type = result["data"]["list"][rebate_random]["transactionType"]
rebate_id = result["data"]["list"][rebate_random]["rebateId"]
rebate_name = result["data"]["list"][rebate_random]["rebateName"]
list_order_status = func(result["data"]["list"][rebate_random]["orderStatus"])
demand_code = result["data"]["list"][rebate_random]["demandCode"]
demand_code = func(result["data"]["list"][rebate_random]["demandCode"])
start_time = result["data"]["list"][rebate_random]["createTimeStr"]
# 获取当前时间作为交易时间截止时间
end_time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
......@@ -71,7 +71,7 @@ request_body = commonFuc().get_business_data(module, "payload2", customer_code,
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content)
print(result)
# 获取查询结果中使用明细对应的客户编号
result = {"customerCode": result["data"]["list"][0]["customerCode"]}
# 获取预期结果
......
......@@ -23,7 +23,7 @@ headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_toke
# 第二步套包协议价查询
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url3")
request_body = commonFuc().get_business_data(module, "payload_10056821")
request_body = commonFuc().get_business_data(module, "payload49")
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content)
......
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