Commit efa3c1b2 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent bd416cb1
......@@ -21,7 +21,7 @@ password = commonFuc().get_business_data(module, "password")
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token1 = CmdcMaiiLogin(username, password).get_token()
headers1 = commonFuc().get_business_data(module, "json_headers1", cmdc_access_token1)
print(headers1)
# 第二步进行需求单创建
url1 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url4")
request_body1 = commonFuc().get_business_data(module, "payload4")
......@@ -38,11 +38,12 @@ order_num = result1["data"]["国药集团北京医疗器械有限公司"]["deman
# 登录后台管理系统获取token信息
# 获取登录后台管理系统所需账号密码
username1 = commonFuc().get_business_data(module, "username1")
password1 = commonFuc().get_business_data(module, "password1")
username1 = commonFuc().get_business_data(module, "username4")
password1 = commonFuc().get_business_data(module, "password4")
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token = CmdcDoLogin(username1, password1).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
# print(username1, password1)
# 第三步在需求单列表根据订单编号查询出新创建的需求单
url2 = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url80")
......@@ -50,6 +51,7 @@ request_body2 = commonFuc().get_business_data(module, "payload80")
# 发送请求
result2 = requests.post(url2, json=request_body2, headers=headers)
result2 = json.loads(result2.content)
# print(result2)
# 获取预期结果
check_dict2 = commonFuc().get_business_data(module, "checkDict80")
# 断言实际结果中是否包含预期结果的内容
......
......@@ -38,8 +38,8 @@ order_num = result1["data"]["国药集团北京医疗器械有限公司"]["deman
# 登录后台管理系统获取token信息
# 获取登录后台管理系统所需账号密码
username1 = commonFuc().get_business_data(module, "username1")
password1 = commonFuc().get_business_data(module, "password1")
username1 = commonFuc().get_business_data(module, "username4")
password1 = commonFuc().get_business_data(module, "password4")
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token = CmdcDoLogin(username1, password1).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
......
......@@ -28,18 +28,15 @@ request_body1 = commonFuc().get_business_data(module, "payload4")
# 发送请求
result1 = requests.post(url1, json=request_body1, headers=headers1)
result1 = json.loads(result1.content)
# # 获取预期结果
# check_dict1 = commonFuc().get_business_data(module, "checkDict4")
# # 断言实际结果中是否包含预期结果的内容
# commonFuc().check_result(check_dict1, result1)
# 获取新创建需求单对应的订单编号
order_num = result1["data"]["国药集团北京医疗器械有限公司"]["demandItems"][0]["demandCode"]
# print(order_num)
# 登录后台管理系统获取token信息
# 获取登录后台管理系统所需账号密码
username1 = commonFuc().get_business_data(module, "username2")
password1 = commonFuc().get_business_data(module, "password2")
username1 = commonFuc().get_business_data(module, "username4")
password1 = commonFuc().get_business_data(module, "password4")
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token = CmdcDoLogin(username1, password1).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
......
......@@ -55,8 +55,8 @@ result3 = json.loads(result3.content)
"""
# 步骤六在后台运营系统查询出用户提交取消申请
# 登录后台运营系统获取token信息
username = commonFuc().get_business_data(module, "username1")
password = commonFuc().get_business_data(module, "password1")
username = commonFuc().get_business_data(module, "username4")
password = commonFuc().get_business_data(module, "password4")
# 获取登录后Cmdc_access_token并进行参数化赋值
cmdc_access_token = CmdcDoLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers", cmdc_access_token)
......
This diff is collapsed.
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