Re: Django test Client problems

2008-06-15 Thread Russell Keith-Magee
On Fri, Jun 13, 2008 at 11:28 PM, Chatchai Neanudorn <[EMAIL PROTECTED]> wrote: > Hi, > > If you want to add functionalities to test client, you may need to modify > (or subclass, if posible ) the client code (django.test.client.Client). This will generally be a good approach, but it is not

Re: Django test Client problems

2008-06-13 Thread Chatchai Neanudorn
Hi, If you want to add functionalities to test client, you may need to modify (or subclass, if posible ) the client code (django.test.client.Client). I used to add ability to set, get "HTTP_HOST" environment, For example, > self.client.http_host = "google.com" So, when my I run unit test, my

Django test Client problems

2008-06-13 Thread shabda
I have some code like this, c = Client() client.get('/myurl/') where '//myurl' calls view function, def foo(request): ip_addrs = request.META['REMOTE_ADDR'] This view function works when I use a browser, as request.META['REMOTE_ADDR'] is populated. But when I use test Client, I get a