diff options
| author | Gregor Gärtner <code@gregorgaertner.de> | 2022-09-24 11:29:58 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-10-07 11:22:16 +0200 |
| commit | 564b317fb53e9925b86ca5ef5d3bbcf99387602c (patch) | |
| tree | ad0ddab0b102099d2789e57b408c2c2a8ed0b0bd /docs/topics/testing/tools.txt | |
| parent | fa9ac16c1345a7fb6ad500c84961a954529ba2b9 (diff) | |
Refs #33990 -- Renamed SimpleTestCase.assertFormsetError() to assertFormSetError().
Co-Authored-By: Michael Howitz <mh@gocept.com>
Diffstat (limited to 'docs/topics/testing/tools.txt')
| -rw-r--r-- | docs/topics/testing/tools.txt | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 1f235d920b..4e2003acde 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1573,16 +1573,16 @@ your test suite. ``assertFormError()`` is deprecated and will be removed in Django 5.0. Use the form instance directly instead. -.. method:: SimpleTestCase.assertFormsetError(formset, form_index, field, errors, msg_prefix='') +.. method:: SimpleTestCase.assertFormSetError(formset, form_index, field, errors, msg_prefix='') Asserts that the ``formset`` raises the provided list of errors when rendered. - ``formset`` is a ``Formset`` instance. The formset must be bound but not - necessarily validated (``assertFormsetError()`` will automatically call the + ``formset`` is a ``FormSet`` instance. The formset must be bound but not + necessarily validated (``assertFormSetError()`` will automatically call the ``full_clean()`` on the formset). - ``form_index`` is the number of the form within the ``Formset`` (starting + ``form_index`` is the number of the form within the ``FormSet`` (starting from 0). Use ``form_index=None`` to check the formset's non-form errors, i.e. the errors you get when calling ``formset.non_form_errors()``. In that case you must also use ``field=None``. @@ -1593,9 +1593,14 @@ your test suite. .. deprecated:: 4.1 Support for passing a response object and a formset name to - ``assertFormsetError()`` is deprecated and will be removed in Django + ``assertFormSetError()`` is deprecated and will be removed in Django 5.0. Use the formset instance directly instead. + .. deprecated:: 4.2 + + The ``assertFormsetError()`` assertion method is deprecated. Use + ``assertFormSetError()`` instead. + .. method:: SimpleTestCase.assertContains(response, text, count=None, status_code=200, msg_prefix='', html=False) Asserts that a :class:`response <django.http.HttpResponse>` produced the |
