From d43cece930957c4b4281a9eacb444485a99505da Mon Sep 17 00:00:00 2001 From: xiao-hesheng Date: Thu, 14 Mar 2024 09:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60\345\242\236\346\250\241\346\235\277.py" | 42 ++++++++++--------- report/summary.html | 4 +- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git "a/air_case/b2_herp3_bs/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" "b/air_case/b2_herp3_bs/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" index 08b17a74..b236bfe1 100644 --- "a/air_case/b2_herp3_bs/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" +++ "b/air_case/b2_herp3_bs/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.air/p2\347\247\221\345\256\244\347\256\241\347\220\206_\347\247\221\345\256\244\344\272\247\345\223\201\345\210\206\351\205\215_\350\257\267\351\242\206\346\250\241\346\235\277\347\273\264\346\212\244_\346\226\260\345\242\236\346\250\241\346\235\277.py" @@ -18,7 +18,10 @@ case_tag:api,herp-web,p2科室管理_科室产品分配_请领模板维护_新 from common.common_func import commonFuc from air_case.b1_herp3_login.登录内网系统.登录内网系统 import login_system + module = "b2_herp3_bs" + + def test1(): """ 场景:p2科室管理_科室产品分配_请领模板维护_新增模板 @@ -26,13 +29,13 @@ def test1(): 输入:"test" 输出:"rtn_msg": {"code": 0, "msg": null, "data":51660462cb564f2e84e93d70661f3ec8} """ - #内网登录 + # 内网登录 username = commonFuc().get_business_data(module, "username") # # print('医院名称',username) password = commonFuc().get_business_data(module, "password") # print(username, password,'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') # 获取token和projectCode - token,projectCode,uxid,corpId,info= login_system(username, password).get_token() + token, projectCode, uxid, corpId, info = login_system(username, password).get_token() # print( token,projectCode,uxid,corpId,info) # pro_path = commonFuc().get_pro_path() # sys.path.append(pro_path + r'\\air_case\\b2_herp3_bs\\n7运维管理_消息通知模板_消息类型_获取消息模板ID.air') @@ -40,13 +43,13 @@ def test1(): # from n7运维管理_消息通知模板_消息类型_获取消息模板ID import test1 # id1= test1() # print(id1) - #p1科室管理_科室产品分配_产品列表查询_条件查询 - url=commonFuc().get_api_url()+commonFuc().get_business_data(module, "basic_goodsPurTemplate_insert_url") + # p1科室管理_科室产品分配_产品列表查询_条件查询 + url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "basic_goodsPurTemplate_insert_url") # 获取请求头信息 headers = commonFuc().get_business_data(module, "json_headers2", commonFuc().get_business_data(module, "json_contentType"), token, - commonFuc().get_business_data(module, "X-APP-CODE")) + commonFuc().get_business_data(module, "X-APP-CODE")) # branch_id = FileUtils().r_info(module, '院区新增')["branch_id"] # str = commonFuc().get_business_data(module, 'data3') # list2 = list(str.split(",")) @@ -60,24 +63,25 @@ def test1(): # 请求体 # for i in list2: request_body = commonFuc().get_business_data(module, "payload59") -# request_body='['+str(request_body)+']' -# new_request_body = request_body.replace("'", '"') -# print(new_request_body) -# import json -# request_body_json = json.loads(new_request_body) -# # # 发送请求 - result = commonFuc().http_post(url, request_body,headers) + # request_body='['+str(request_body)+']' + # new_request_body = request_body.replace("'", '"') + # print(new_request_body) + # import json + # request_body_json = json.loads(new_request_body) + # # # 发送请求 + result = commonFuc().http_post(url, request_body, headers) print('resultaaaaaaaaaaaaaaaaaaaaaaaaaaa', result) -#断言 -# checkDict=commonFuc().get_business_data(module,'checkDict10') -# commonFuc().check_result(checkDict,result) - code=commonFuc().analysis_json('code',result) - data=commonFuc().analysis_json('data',result) - data1=commonFuc().analysis_json('data',data) + # 断言 + # checkDict=commonFuc().get_business_data(module,'checkDict10') + # commonFuc().check_result(checkDict,result) + code = commonFuc().analysis_json('code', result) + data = commonFuc().analysis_json('data', result) + data1 = commonFuc().analysis_json('data', data) - if code==0 and len(data)>=1: + if code == 0 and len(data) >= 1: commonFuc().check_text_exist(0, result) else: commonFuc().check_text_exist('error', result) + test1() diff --git a/report/summary.html b/report/summary.html index 769bdbc4..5f116b21 100644 --- a/report/summary.html +++ b/report/summary.html @@ -72,9 +72,9 @@ - o6科室管理_科室产品分配_添加科室产品页面_条件查询 + p1科室管理_科室产品分配_产品列表查询 成功 - 2.42 + 2.128 xiaohesheng -- GitLab