Add REMOTE_ADDR: '127.0.0.1' to TestClient environment by default
|Reported by:||Michael Schurter||Owned by:||Eric Holscher|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The fake environment django.test.client.Client sets up is missing REMOTE_ADDR. It could be very safely and accurately defaulted to localhost (127.0.0.1).
Luckily this issue is very easy to work around when instantiating the test Client:
c = Client(REMOTE_ADDR='127.0.0.1')