Wednesday, August 24, 2011

Re: How to add CSRF to context when using test client???

Thanks for both suggestions, I recently tried this approach and
reached success when I ran my tests. So I think this is the correct
approach and I'll include this CSRF style testing with my test suite
now.

-Matteius

On Jul 7, 6:02 am, Craig Blaszczyk <masterja...@gmail.com> wrote:
> csrf_token is a proxy object not a string.
>
> Try doing:
> csrf_token = '%s' % response.context['csrf_token']

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

No comments:

Post a Comment