#NEWLINE# def test_download_object_invalid_file_already_exists( self ) : #NEWLINE# #INDENT# self . mock_raw_response_klass . type = 'INVALID_SIZE' #NEWLINE# container = Container ( name = 'foo_bar_container' , extra = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , driver = self . driver ) #NEWLINE# obj = Object ( name = 'foo_bar_object' , size = 1000 , hash = None , extra = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , container = container , meta_data = None , driver = self . driver_type ) #NEWLINE# destination_path = os . path . abspath ( __file__ ) #NEWLINE# try : #NEWLINE# #INDENT# self . driver . download_object ( obj = destination_path , destination_path = destination_path , overwrite_existing = False , delete_on_failure = True ) #NEWLINE# #UNINDENT# except LibcloudError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . fail ( 'Exception was not thrown' )