def test_render_internal_ip(self):
     req = HttpRequest()
     req.META["REMOTE_ADDR"] = "1.1.1.1"
     context = Context({"request": req})
     r = GoSquaredNode().render(context)
     self.assertTrue(r.startswith("<!-- GoSquared disabled on internal IP address"), r)
     self.assertTrue(r.endswith("-->"), r)
 def test_render_internal_ip(self):
     req = HttpRequest()
     req.META['REMOTE_ADDR'] = '1.1.1.1'
     context = Context({'request': req})
     r = GoSquaredNode().render(context)
     assert r.startswith('<!-- GoSquared disabled on internal IP address')
     assert r.endswith('-->')
 def test_render_internal_ip(self):
     req = HttpRequest()
     req.META['REMOTE_ADDR'] = '1.1.1.1'
     context = Context({'request': req})
     r = GoSquaredNode().render(context)
     self.assertTrue(r.startswith(
             '<!-- GoSquared 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 = GoSquaredNode().render(context)
     self.assertTrue(r.startswith(
             '<!-- GoSquared 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 = GoSquaredNode().render(context)
     self.assertTrue(
         r.startswith('<!-- GoSquared disabled on internal IP address'), r)
     self.assertTrue(r.endswith('-->'), r)