#NEWLINE# def test_remote_addr_in_env( self ) : #NEWLINE# #INDENT# response = self . client . get ( '/env' , headers = { #NEWLINE# #INDENT# 'X_APPENGINE_USER_IP' : FAKE_IP , #NEWLINE# #UNINDENT# } ) #NEWLINE# env = json . loads ( response . data ) #NEWLINE# self . assertEqual ( env [ 'REMOTE_ADDR' ] , FAKE_IP ) #NEWLINE# response = self . client . get ( '/env' , headers = { #NEWLINE# #INDENT# 'X_APPENGINE_REMOTE_ADDR' : FAKE_IP , #NEWLINE# 'X_APPENGINE_USER_IP' : WRONG_IP , #NEWLINE# #UNINDENT# } ) #NEWLINE# env = json . loads ( response . data ) #NEWLINE# self . assertEqual ( env [ 'REMOTE_ADDR' ] , FAKE_IP )