def setUp(self): print("测试准备,比如链接数据库,获取配置文件内容等操作") case_excle = ReadCase('mltest.xlsx', '工作表1') self.login_url = case_excle.get_interface_url('login') self.login_data = case_excle.get_interface_data('login') self.login_headers = case_excle.get_intetface_headers('login') self.login_data_error = case_excle.get_interface_data('login_error') self.login_url_error = case_excle.get_interface_url('login_error') self.login_headers_error = case_excle.get_intetface_headers( 'login_error')
def setUp(self): self.log = Log() self.log.info('loginnull测试开始') case_excle = ReadCase('mltest.xlsx', '工作表1') self.login_url_null = case_excle.get_interface_url('login_null') self.login_data_null = case_excle.get_interface_data('login_null') self.login_headers_null = case_excle.get_intetface_headers('login_null')
def setUp(self): case_excle = ReadCase('mltest.xlsx', '工作表1') self.getnearbyplaces_url = case_excle.get_interface_url( 'getnearbyplaces', True) self.getnearbyplaces_data = case_excle.get_interface_data( 'getnearbyplaces') self.getnearbyplaces_headers = { 'Content-Type': 'application/json; charset=UTF-8' }