#NEWLINE# @ override_settings ( ANALYTICAL_INTERNAL_IPS = [ '1.1.1.1' ] ) #NEWLINE# def test_render_internal_ip( self ) : #NEWLINE# #INDENT# req = HttpRequest ( ) #NEWLINE# req . META [ 'REMOTE_ADDR' ] = '1.1.1.1' #NEWLINE# context = Context ( { #NEWLINE# #INDENT# 'request' : req , #NEWLINE# #UNINDENT# } ) #NEWLINE# r = ChartbeatBottomNode ( ) . render ( context ) #NEWLINE# self . assertTrue ( r . startswith ( '<!-- Chartbeat disabled on internal IP address' ) , r ) #NEWLINE# self . assertTrue ( r . endswith ( '-->' ) , context )