# -*- encoding=utf8 -*-

__author__ = "xiaohesheng"

"""
case_tag:api,mdm-web,公立医院注册,id2249,id2249-3,sit,on,10086
主数据平台:公立医院注册
"""
from common.common_func import commonFuc

module = "a3_mdm3_hs"
# 注册企业
url = commonFuc().get_api_url() + commonFuc().get_business_data(module, "insertHosRegistInfo_url")
# #获取请求头信息
headers = commonFuc().get_business_data(module, "json_headers",
                                        commonFuc().get_business_data(module, "json_contentType"))

h_name = commonFuc().get_business_data(module, "name1")  # 获取前缀name
h_name = h_name + commonFuc().randomString(5)  # 随机数生成拼接企业名称
request_body = commonFuc().get_business_data(module, "payload",h_name,h_name,h_name,h_name,h_name,h_name,h_name,h_name)

# 发送请求
result = commonFuc().http_post(url, request_body, headers)
#获取接口返回数据
check_dict = commonFuc().get_business_data(module, "checkDict")
print(h_name,result)
#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result)

global_var = "this is a global variable"
