Commits

ishalyapin  committed 1019743

In production environment we always have REMOTE_ADDR and we need it in test env for some apps.

  • Participants
  • Parent commits 32a1919

Comments (0)

Files changed (1)

File django_webtest/__init__.py

     def do_request(self, req, status, expect_errors):
         # Curry a data dictionary into an instance of the template renderer
         # callback function.
+        req.environ.setdefault('REMOTE_ADDR', '127.0.0.1')
         data = {}
         on_template_render = curry(store_rendered_templates, data)
         template_rendered.connect(on_template_render)