#NEWLINE# def test_file_move_overwrite( self ) : #NEWLINE# #INDENT# ( handle_a , self . file_a ) = tempfile . mkstemp ( dir = os . environ [ 'DJANGO_TEST_TEMP_DIR' ] ) #NEWLINE# ( handle_b , self . file_b ) = tempfile . mkstemp ( dir = os . environ [ 'DJANGO_TEST_TEMP_DIR' ] ) #NEWLINE# self . assertRaises ( IOError , ( lambda : file_move_safe ( self . file_a , self . file_b , allow_overwrite = False ) ) ) #NEWLINE# self . assertIsNone ( file_move_safe ( self . file_a , self . file_b , allow_overwrite = True ) ) #NEWLINE# os . close ( handle_a ) #NEWLINE# os . close ( handle_b )