Thursday, July 7, 2011

Re: KeyError in UnitTests

Could it be because the test is passing 'Brasil' instead of 'BR'? I'm
assuming 'BR' is a valid choice and 'Brasil' is invalid. That's why
you're passing 'PR' instead of 'Paraná' in your data dictionary.

If the field isn't a required field, then your form.is_valid() would be
true, but there wouldn't be a value in cleaned_data['country'] when you
got to your form's clean().


--
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.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate