Commit 619ba53f authored by liguangyu06's avatar liguangyu06
Browse files

用例优化

parent 6f8db1ec
......@@ -51,9 +51,16 @@ request_body = group_json
# 发送请求
result = requests.post(url, json=request_body, headers=headers)
result = json.loads(result.content)
print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict16")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
# print(result)
if result["success"]:
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict16_1")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
else:
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict16")
# print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)
......@@ -130,7 +130,7 @@ checkDict15: {"success":false,"code":"FRESENIUS_GROUP_ERROR","message":"组成
#预期结果
checkDict16: {"success":false,"code":"FRESENIUS_GROUP_ERROR","message":"组成一个套包内商品需满足套包在同一产品线下","data":null,"freshToken":null}
"other_product": {"productCode":"10057881","productName":"造口护理用品附件","manufacturer":"Coloplast A/S","manufacturerCode":"7000118","optionStr":"12070","storageCondition":"999","activityUnitAmount":null,"price":15.2,"measuringUnit":"个","materialCode":"","description":"","quantity":"1","manufacturerProductNo":null,"manufacturerProductDesc":null,"produceRegisterNum":"国械注进20152664141","productLineName":"康乐保","productLineCode":"3111"}
checkDict16_1: {"success":true,"code":"200","message":"OK","data":true}
#测试场景十七:套包更新验证
......
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