#33346: assertFormsetError() crashes on formset named "form".
-----------------------------------+------------------------------------
     Reporter:  OutOfFocus4        |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Testing framework  |                  Version:  4.0
     Severity:  Release blocker    |               Resolution:
     Keywords:                     |             Triage Stage:  Accepted
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:3 Baptiste Mispelon]:
 > ...
 > Restricting the search to the first context would probably fix most
 issues like the one reported here, but it's not 100% correct (and
 backwards-incompatible).

 What do you think about skipping context values that are not a `FormSet`
 instance? or don't have the `forms` attribute. This should be backward
 compatible.

 >
 > The only way out that I could think of would be to deprecate passing a
 `response` to `assertFormError`/`assertFormsetError` in favor of passing
 the form/formset object directly. I think it would be a more natural API
 anway (I never understood why the assertions were based on the response to
 begin with).

 We cannot change or deprecate an existing and documented API as a part of
 patch which is intended for backport. This can be discussed separately.
 Personally, I like the idea.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33346#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/069.332f4358e97628dd6e24a6e896b4ceb4%40djangoproject.com.

Reply via email to