#NEWLINE# def browser_upload_file( self , filename ) : #NEWLINE# #INDENT# url = reverse ( 'upload' ) #NEWLINE# self . client . login ( username = self . username , password = self . password ) #NEWLINE# data = { #NEWLINE# #INDENT# 'file' : open ( filename , 'r' ) , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( url , self ) #NEWLINE# return response