Re: Exception thrown from django.test.client.Client

2008-10-27 Thread [EMAIL PROTECTED]
Thank you, that seems to have done it. I didn't know you could set REMOTE_ADDR explicitly in the constructor. On Oct 23, 12:16 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 23, 2008 at 11:41 AM, [EMAIL PROTECTED] < > > [EMAIL PROTECTED]> wrote: > > > By using pdb post mortem, I foun

Re: Exception thrown from django.test.client.Client

2008-10-23 Thread Karen Tracey
On Thu, Oct 23, 2008 at 11:41 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > By using pdb post mortem, I found out that the request.META dictionary > doesn't actually have 'REMOTE_ADDR' in it. Settings.INTERNAL_IPS is > '127.0.0.1'. So then get() returns None, and the error comes from > pyt

Re: Exception thrown from django.test.client.Client

2008-10-23 Thread [EMAIL PROTECTED]
By using pdb post mortem, I found out that the request.META dictionary doesn't actually have 'REMOTE_ADDR' in it. Settings.INTERNAL_IPS is '127.0.0.1'. So then get() returns None, and the error comes from python trying to evaluate None in '127.0.0.1'. Should the test client be setting this value?

Exception thrown from django.test.client.Client

2008-10-23 Thread [EMAIL PROTECTED]
I found this problem while trying out the django test client: $ ./manage.py shell >>> from django.test.client import Client >>> c = Client() >>> c.get('/') Traceback (most recent call last): File "", line 1, in File "/var/lib/python-support/python2.5/django/test/client.py", line 265, in get