#NEWLINE# def test_redirect( self ) : #NEWLINE# #INDENT# http = proxy_from_url ( self . proxy_url ) #NEWLINE# r = http . request ( 'GET' , ( '%s/redirect' % self . http_url ) , fields = { #NEWLINE# #INDENT# 'target' : ( '%s/' % self . http_url ) , #NEWLINE# #UNINDENT# } , redirect = False ) #NEWLINE# self . assertEqual ( r . status , 303 ) #NEWLINE# r = http . request ( 'GET' , ( '%s/redirect' % self . http_url ) , fields = { #NEWLINE# #INDENT# 'target' : ( '%s/' % self . http_url ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( r . status , 200 ) #NEWLINE# self . assertEqual ( r . data , b'Dummy server!' )