# -*- encoding=utf8 -*-
from common.db.sql.sql_del_branch_info import delData

__author__ = "xiaohesheng"

"""
case_tag:api,mdm-web,医院注册时医院已存在,id2249,id2249-2,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)

# 发送请求
result1 = commonFuc().http_post(url, request_body, headers)
print('result1',result1)
#获取接口返回数据
check_dict = commonFuc().get_business_data(module, "checkDict1")

#断言实际结果中是否包含预期结果的内容
commonFuc().check_result(check_dict, result1)

# check_dict = commonFuc().get_business_data('a3_mdm3_hs', "checkDict3")


# print('check_dict',type(check_dict),check_dict)
# result2=delData().check_goods_info()
# print('result2',type(result2),result2)
# if result2==check_dict:
#     print('okaaaaaaaaaaaaaaaaaaaaa')
# else:
#     print('bbbbbbbbbbbbbbbbbbbbbbbbbbb')