An error occurred while loading the file. Please try again.
An error occurred while loading the file. Please try again.
An error occurred while loading the file. Please try again.
-
liguangyu06 authored4cc40faa
# -*- encoding=utf8 -*-
__author__ = "liguangyu"
"""
case_tag:api,cmdc站点不满足快速下单,2250,sit,bs
主数据平台:多彩商城快速下单权限判定接口
"""
from common.common_func import commonFuc
import requests
import json
module = "cmdc-qos"
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "url")
print(url)
# url = "https://service-slb.cmic.com.cn/cms/public/isQuickOrderSign"
# 获取公司ID
companyId = commonFuc().get_business_data(module, "companyId2")
print(companyId)
request_body = commonFuc().get_business_data(module, "payload", companyId)
print(request_body)
"""
场景:站点不具有快速下单权限入口
用例名称:快速下单权限判定接口-站点不满足条件显示快速下单入口
输入:companyId
输出:"quickOrderSign": 0
"""
# 发送请求
result = requests.get(url, params=request_body)
result = json.loads(result.text)
print(result)
# 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict2")
print(check_dict)
# 断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)