On Saturday 31 October 2009 03:04:28 Kegan Gan wrote:
> How does the csrf_token affect TestCase.client.post() ?

The token doesn't affect it directly.  The HttpRequest class that 
TestCase uses is hacked so that the middleware and csrf_protect 
decorator don't actually reject requests which have the token.  
Basically, it disables the protection for your tests, to make testing 
of views much easier.  All the cookies and tokens work just the same.

Luke

-- 
A common mistake that people make when trying to design something 
completely foolproof is to underestimate the ingenuity of complete 
fools.  -- Douglas Adams

Luke Plant || http://lukeplant.me.uk/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to