On 1/8/07, Waylan Limberg <[EMAIL PROTECTED]> wrote:

As of changeset 4284 [1], the behavior of clean_data was altered. It
looks like the tests in tests/modeltests/model_forms/models.py were
not updated to reflect that change. Specifically, I see no calls to
is_valid() which would explain the above error.

[1]: http://code.djangoproject.com/changeset/4284


Unfortunately, I don't have the means to run the tests right now, and
I don't recall if calling form.errors (when it returns an empty dict
{}) has the same result as is_valid() (when it returns True), but in
either case, the test which uses invalid data needs updating.
Specifically, the result of line 111 ( f.clean_data) should not be
blank but return an error:

   Traceback (most recent call last):
   ...
   AttributeError: 'CategoryForm' object has no attribute 'clean_data'

Insert those three lines between lines 111 & 112) and run the tests
again. If that doesn't do the trick, then in the three tests before
that, either insert a line before or in place of `f.errors` calling
`f.is_valid()` that returns `True`.

Sorry, I'd do it myself, but can't right now. Perhaps I'll get a
chance on my lunch break and submit a patch if no one else has.


--
----
Waylan Limberg
[EMAIL PROTECTED]

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