mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #33348 -- Changed SimpleTestCase.assertFormError()/assertFormsetErrors() to take form/formset.
Instead of taking a response object and a context name for the form/formset, the two methods now take the object directly.
This commit is contained in:
committed by
Mariusz Felisiak
parent
1a7d75cf77
commit
50e1e7ef8e
@@ -327,6 +327,10 @@ Tests
|
||||
* A nested atomic block marked as durable in :class:`django.test.TestCase` now
|
||||
raises a ``RuntimeError``, the same as outside of tests.
|
||||
|
||||
* :meth:`.SimpleTestCase.assertFormError` and
|
||||
:meth:`~.SimpleTestCase.assertFormsetError` now support passing a
|
||||
form/formset object directly.
|
||||
|
||||
URLs
|
||||
~~~~
|
||||
|
||||
@@ -449,6 +453,9 @@ Miscellaneous
|
||||
|
||||
* The admin log out UI now uses ``POST`` requests.
|
||||
|
||||
* The undocumented ``InlineAdminFormSet.non_form_errors`` property is replaced
|
||||
by the ``non_form_errors()`` method. This is consistent with ``BaseFormSet``.
|
||||
|
||||
.. _deprecated-features-4.1:
|
||||
|
||||
Features deprecated in 4.1
|
||||
@@ -552,6 +559,15 @@ Miscellaneous
|
||||
* The :data:`django.utils.timezone.utc` alias to :attr:`datetime.timezone.utc`
|
||||
is deprecated. Use :attr:`datetime.timezone.utc` directly.
|
||||
|
||||
* Passing a response object and a form/formset name to
|
||||
``SimpleTestCase.assertFormError()`` and ``assertFormsetError()`` is
|
||||
deprecated. Use::
|
||||
|
||||
assertFormError(response.context['form_name'], …)
|
||||
assertFormsetError(response.context['formset_name'], …)
|
||||
|
||||
or pass the form/formset object directly instead.
|
||||
|
||||
Features removed in 4.1
|
||||
=======================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user