#NEWLINE# def test_filer_upload_file_error( self , extra_headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# self . assertEqual ( Image . objects . count ( ) , 0 ) #NEWLINE# folder = Folder . objects . create ( name = 'foo' ) #NEWLINE# file_obj = django . core . files . File ( open ( self . filename , 'rb' ) ) #NEWLINE# url = reverse ( 'admin:filer-ajax_upload' , kwargs = { #NEWLINE# #INDENT# 'folder_id' : ( folder . pk + 1 ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# post_data = { #NEWLINE# #INDENT# 'Filename' : self . image_name , #NEWLINE# 'Filedata' : file_obj , #NEWLINE# 'jsessionid' : self . client . session . session_key , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( url , post_data , ** url ) #NEWLINE# from .. admin.clipboardadmin import NO_FOLDER_ERROR #NEWLINE# self . assertContains ( response , NO_FOLDER_ERROR ) #NEWLINE# self . assertEqual ( Image . objects . count ( ) , 0 )