Commit cd4773b3 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent c3799494
......@@ -14,8 +14,8 @@ import json
module = "cmdc_special_version"
# 第一步登录后台运营系统获取token
username = commonFuc().get_business_data(module, "username_do_be")
password = commonFuc().get_business_data(module, "password_do_be")
username = commonFuc().get_business_data(module, "username_admin2")
password = commonFuc().get_business_data(module, "password_admin2")
# 获取登录后Cmdc_access_token
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
......@@ -30,10 +30,12 @@ result = json.loads(result.content)
# 获取产品线信息
productLineCode = result["data"]["list"][0]["productLineCode"]
productLineName = result["data"]["list"][0]["productLineName"]
numberSource = result["data"]["list"][0]["numberSource"]
soStartTimeStr = result["data"]["list"][0]["soStartTimeStr"]
# 第三步植入产品线新增
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url47")
request_body = [commonFuc().get_business_data(module, "payload47", productLineCode, productLineName)]
request_body = [
commonFuc().get_business_data(module, "payload47", productLineCode, productLineName, numberSource, soStartTimeStr)]
"""
......@@ -60,4 +62,3 @@ check_dict = commonFuc().get_business_data(module, "checkDict47", productLineNam
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
......@@ -310,7 +310,7 @@ checkDict46: {"success":true,"code":"200","message":"OK","data":{"errList":["产
#测试场景47:产品线已存在_植入产品线新增
"url47": "/order/public/batchReportProductline"
"payload47": {"productLineCode":"%s","productLineName":"%s","numberSource":2,"soStartTimeStr":null,"status":0}
"payload47": {"productLineCode":"%s","productLineName":"%s","numberSource":"%s","soStartTimeStr":"%s","status":0}
#预期结果
checkDict47: {"errList":"产品线:%s已存在,无法添加"}
......
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