Author: russellm
Date: 2009-02-21 01:19:12 -0600 (Sat, 21 Feb 2009)
New Revision: 9847

Modified:
   django/trunk/django/test/client.py
Log:
Fixed #8551 -- Added REMOTE_ADDR to the default Test Client environment. Thanks 
to schmichael for the report and patch.

Modified: django/trunk/django/test/client.py
===================================================================
--- django/trunk/django/test/client.py  2009-02-19 22:45:48 UTC (rev 9846)
+++ django/trunk/django/test/client.py  2009-02-21 07:19:12 UTC (rev 9847)
@@ -70,7 +70,7 @@
                 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 @@
             'HTTP_COOKIE':      self.cookies,
             'PATH_INFO':         '/',
             'QUERY_STRING':      '',
+            'REMOTE_ADDR':       '127.0.0.1',
             'REQUEST_METHOD':    'GET',
             'SCRIPT_NAME':       '',
             'SERVER_NAME':       'testserver',


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to