On Mon, 2008-12-08 at 15:00 -0800, Jason Sidabras wrote:
> Hello,
> 
> I am working on adding unit testing to my code and the snag I have
> come across is in regards to unit fields.
> 
> When user.is_anonymous() I have a hidden field sender_id = 1 which is
> easy to test by:
> 
> from django.test.client import Client
> 
> c = Client()
> c.post('sender_id': '1', 'post', '<data>')
> 
> but when setting up unit tests for the form when a user is logged in,
> I am not clear on how to use the hidden fields.

What do you mean by "how to use"? Hidden fields are just form variables.
The 'hidden' designation is only relevant for a web browser displaying
the data. You just submit values normally in your tests.

Could you explain what you are getting stuck on here? How does the
logged in situation differ from the non-logged-in case?

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to