diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-02-21 07:19:12 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-02-21 07:19:12 +0000 |
| commit | cd0611bd83ecc404bf250a24062aa5071a072353 (patch) | |
| tree | 14244d43f8846623701106a6d8bdbdb8d4e53af3 | |
| parent | 322a6a9d1dffee284bb9ea1b309e64f7fa7411b5 (diff) | |
Fixed #8551 -- Added REMOTE_ADDR to the default Test Client environment. Thanks to schmichael for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9847 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/test/client.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/test/client.py b/django/test/client.py index d89b625a68..96d0c89602 100644 --- a/django/test/client.py +++ b/django/test/client.py @@ -70,7 +70,7 @@ class ClientHandler(BaseHandler): 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 @@ class Client(object): 'HTTP_COOKIE': self.cookies, 'PATH_INFO': '/', 'QUERY_STRING': '', + 'REMOTE_ADDR': '127.0.0.1', 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_NAME': 'testserver', |
