Commit 4e41496c authored by liguangyu06's avatar liguangyu06
Browse files

优化用例

parent 01f3c9e8
...@@ -29,8 +29,10 @@ request_body = commonFuc().get_business_data(module, "payload10") ...@@ -29,8 +29,10 @@ request_body = commonFuc().get_business_data(module, "payload10")
# 发送请求 # 发送请求
result = requests.post(url1, json=request_body, headers=headers) result = requests.post(url1, json=request_body, headers=headers)
result = json.loads(result.content) result = json.loads(result.content)
print(result)
# 获取demandId # 获取demandId
demand_id = result["data"]["list"][0]["demandId"] demand_id = result["data"]["list"][0]["demandId"]
print(demand_id)
# 第三步删除操作 # 第三步删除操作
url2 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url") url2 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url")
request_body2 = commonFuc().get_business_data(module, "payload1", demand_id) request_body2 = commonFuc().get_business_data(module, "payload1", demand_id)
...@@ -39,12 +41,14 @@ result2 = requests.post(url2, json=request_body2, headers=headers) ...@@ -39,12 +41,14 @@ result2 = requests.post(url2, json=request_body2, headers=headers)
# 第四步重复进行删除操作 # 第四步重复进行删除操作
url3 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url") url3 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url")
request_body3 = commonFuc().get_business_data(module, "payload3") print(url3)
request_body3 = commonFuc().get_business_data(module, "payload3", demand_id)
print(request_body3)
""" """
场景:重复删除需求单 场景:重复删除需求单
用例名称:重复删除需求单 用例名称:重复删除需求单
输出:{"success":false,"code":"demand","message":"订单已拒绝,无法重复拒绝","data":null,"freshToken":null} 输出:{"success":false,"code":"demand","message":"订单已提交过,请稍后操作","data":null,"freshToken":null}
""" """
# 发送请求 # 发送请求
......
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