Exemplo n.º 1
0
 def test_render_internal_ip(self):
     req = HttpRequest()
     req.META['REMOTE_ADDR'] = '1.1.1.1'
     context = Context({'request': req})
     r = ClickyNode().render(context)
     assert r.startswith('<!-- Clicky disabled on internal IP address')
     assert r.endswith('-->')
Exemplo n.º 2
0
 def test_render_internal_ip(self):
     req = HttpRequest()
     req.META['REMOTE_ADDR'] = '1.1.1.1'
     context = Context({'request': req})
     r = ClickyNode().render(context)
     self.assertTrue(r.startswith(
             '<!-- Clicky disabled on internal IP address'), r)
     self.assertTrue(r.endswith('-->'), r)
 def test_render_internal_ip(self):
     self.settings_manager.set(ANALYTICAL_INTERNAL_IPS=['1.1.1.1'])
     req = HttpRequest()
     req.META['REMOTE_ADDR'] = '1.1.1.1'
     context = Context({'request': req})
     r = ClickyNode().render(context)
     self.assertTrue(
         r.startswith('<!-- Clicky disabled on internal IP address'), r)
     self.assertTrue(r.endswith('-->'), r)
Exemplo n.º 4
0
 def test_render_internal_ip(self):
     self.settings_manager.set(ANALYTICAL_INTERNAL_IPS=['1.1.1.1'])
     req = HttpRequest()
     req.META['REMOTE_ADDR'] = '1.1.1.1'
     context = Context({'request': req})
     r = ClickyNode().render(context)
     self.assertTrue(r.startswith(
             '<!-- Clicky disabled on internal IP address'), r)
     self.assertTrue(r.endswith('-->'), r)