Browse files

Fixed #8551 -- Added REMOTE_ADDR to the default Test Client environme…

…nt. Thanks to schmichael for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 322a6a9 commit cd0611bd83ecc404bf250a24062aa5071a072353 @freakboy3742 freakboy3742 committed Feb 21, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/test/client.py
View
3 django/test/client.py
@@ -70,7 +70,7 @@ def __call__(self, environ):
response = middleware_method(request, response)
response = self.apply_response_fixes(request, response)
finally:
- signals.request_finished.disconnect(close_connection)
+ signals.request_finished.disconnect(close_connection)
signals.request_finished.send(sender=self.__class__)
signals.request_finished.connect(close_connection)
@@ -193,6 +193,7 @@ def request(self, **request):
'HTTP_COOKIE': self.cookies,
'PATH_INFO': '/',
'QUERY_STRING': '',
+ 'REMOTE_ADDR': '127.0.0.1',
'REQUEST_METHOD': 'GET',
'SCRIPT_NAME': '',
'SERVER_NAME': 'testserver',

0 comments on commit cd0611b

Please sign in to comment.