#NEWLINE# def test_get_ip_address( self ) : #NEWLINE# #INDENT# r = Mock ( META = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( get_ip_address ( r ) , None ) #NEWLINE# r = Mock ( META = { #NEWLINE# #INDENT# 'REMOTE_ADDR' : '2001:0DB8:0:CD30::' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( get_ip_address ( r ) , '2001:0DB8:0:CD30::' ) #NEWLINE# r = Mock ( META = { #NEWLINE# #INDENT# 'HTTP_X_CLUSTERED_CLIENT_IP' : '10.0.0.1, 10.1.1.1' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( get_ip_address ( r ) , '10.0.0.1' )