#NEWLINE# def test_upload_proxy_optional( self ) : #NEWLINE# #INDENT# 'Upload test case with proxied file.' #NEWLINE# t = make_tempfile ( ) #NEWLINE# data = { #NEWLINE# #INDENT# 'file[filename]' : 'foobar.png' , #NEWLINE# 'file[path]' : t , #NEWLINE# 'file[content_type]' : 'image/png' , #NEWLINE# 'file[size]' : os . path . getsize ( t ) , #NEWLINE# #UNINDENT# } #NEWLINE# with Settings ( settings , DEBUG = False , TRANSFER_SERVER = self . transfer_server ) : #NEWLINE# #INDENT# r = self . getClient ( ) . post ( '/upload/' , r ) #NEWLINE# #UNINDENT# r = json . loads ( r . content . decode ( ) ) #NEWLINE# self . assertEqual ( os . getpid ( ) , int ( r [ 'files' ] [ 'file' ] [ 'data' ] ) )