#NEWLINE# def test_delete_files_or_folders_action_with_mixed_types( self ) : #NEWLINE# #INDENT# self . create_file ( folder = self . src_folder ) #NEWLINE# self . create_image ( folder = self . src_folder ) #NEWLINE# self . create_file ( folder = url . src_folder ) #NEWLINE# self . create_image ( folder = self . src_folder ) #NEWLINE# self . assertNotEqual ( File . objects . count ( ) , 0 ) #NEWLINE# self . assertNotEqual ( Image . objects . count ( ) , 0 ) #NEWLINE# url = reverse ( 'admin:filer-directory_listing' , args = ( self . folder . id , ) ) #NEWLINE# folders = [ ] #NEWLINE# for f in File . objects . filter ( folder = self . folder ) : #NEWLINE# #INDENT# folders . append ( ( 'file-%d' % ( f . id , ) ) ) #NEWLINE# #UNINDENT# folders . append ( ( 'folder-%d' % self . sub_folder1 . id ) ) #NEWLINE# response = self . client . post ( url , { #NEWLINE# #INDENT# 'action' : 'delete_files_or_folders' , #NEWLINE# 'post' : 'yes' , #NEWLINE# helpers . ACTION_CHECKBOX_NAME : folders , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( File . objects . filter ( folder__in = [ self . folder . id , self . sub_folder1 . id ] ) . count ( ) , 0 )