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.
-
xiao-hesheng authoredd9f30372
# -*- encoding=utf8 -*-
__author__ = "xiaohesheng"
"""
case_tag:api,mdm-web企业审核,id2248,id2248-3,sit,on
主数据平台:注册企业审核认领流程
"""
from common.common_func import commonFuc
from air_case.mdm_login.登录外网系统.登录外网系统 import login_system
from airtest.core.api import using
import sys
module = "mdm3_ea"
pro_path=commonFuc().get_pro_path()
sys.path.append(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
using(pro_path+r'\\air_case\\mdm3_ea\\a企业认领.air')
from a企业认领 import *
# print('global_var_id',global_var_id)
id1=global_var_id
"""
场景:注册企业认领
用例名称:企业认领
输入:CRid
输出:"rtn_msg": "企业被认领"
"""
# 企业注册提交接口_审核通过_开始
username = commonFuc().get_business_data(module, "username")
password = commonFuc().get_business_data(module, "password")
# print(username, password)
# 获取token和projectCode
token,projectCode,uxid,corpId,info= login_system(username, password).get_token()
#获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers2",
commonFuc().get_business_data(module, "json_contentType"), token,
projectCode, token)
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "auditCompanyRegistBill_url")
request_body = commonFuc().get_business_data(module, "payload5",id1)
# 发送请求
result = commonFuc().http_post(url, request_body, headers)
# print('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',result)
#获取接口返回数据
code = commonFuc().analysis_json('code', result)
check_dict1 = commonFuc().get_business_data(module, "checkDict1")
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict1, result)
#===============企业注册提交接口_审核通过_结束