Commit 19c52d09 authored by liguangyu06's avatar liguangyu06
Browse files

需求单-草稿订单删除接口

parent 8a01cbd8
...@@ -20,7 +20,7 @@ print(url123) ...@@ -20,7 +20,7 @@ print(url123)
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin("admin1", "FFtmods@365y").get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
print(cmdc_access_token) print(cmdc_access_token)
headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token)
print(headers) print(headers)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
__author__ = "liguangyu" __author__ = "liguangyu"
""" """
case_tag:api,cmdc需求单删除功能验证,用例集id2250,sit,bs case_tag:api,cmdc需求单-草稿订单删除功能验证,用例集id2250,sit,bs
主数据平台:运营后台管理系统需求单删除接口 主数据平台:运营后台管理系统需求单-草稿订单删除接口
""" """
from common.common_func import commonFuc from common.common_func import commonFuc
...@@ -14,29 +14,31 @@ import json ...@@ -14,29 +14,31 @@ import json
module = "cmdc_demand_list" module = "cmdc_demand_list"
url123 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url") url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url")
print(url123) print(url)
# 获取登录所需账号密码 # 获取登录所需账号密码
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin("admin1", "FFtmods@365y").get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
print(cmdc_access_token) print(cmdc_access_token)
headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers2",cmdc_access_token)
print(headers) print(headers)
request_body = commonFuc().get_business_data(module, "payload1") request_body = commonFuc().get_business_data(module, "payload2")
print(request_body) print(request_body)
""" """
场景:需求单可正常删除,删除后不再显示在需求列表中 场景:需求草稿订单可正常删除,删除后不再显示在需求列表中
用例名称:需求单删除功能验证 用例名称:需求草稿订单删除功能验证
输出:{"success":true,"code":"200","message":"OK"} 输出:{"success":true,"code":"200","message":"OK","data":null}
""" """
# 发送请求 # 发送请求
result = requests.post(url123, json=request_body, headers=headers) result = requests.get(url, params=request_body, headers=headers)
# result = requests.get(url, params=request_body)
# result = commonFuc.http_get(url, headers=headers, params=request_body)
result = json.loads(result.content) result = json.loads(result.content)
print(result) print(result)
# 获取预期结果 # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2") check_dict = commonFuc().get_business_data(module, "checkDict3")
print(check_dict) print(check_dict)
# 断言实际结果中是否包含预期结果的内容 # 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result) commonFuc().check_result(check_dict, result)
......
...@@ -20,7 +20,7 @@ print(url) ...@@ -20,7 +20,7 @@ print(url)
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin("admin2", "FFtmods@365y").get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
print(cmdc_access_token) print(cmdc_access_token)
headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token)
print(headers) print(headers)
......
...@@ -20,7 +20,7 @@ print(url) ...@@ -20,7 +20,7 @@ print(url)
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin("admin2", "FFtmods@365y").get_token() cmdc_access_token = CmdcDoLogin(username, password).get_token()
print(cmdc_access_token) print(cmdc_access_token)
headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers1",cmdc_access_token)
print(headers) print(headers)
......
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