diff options
| author | Chinmoy Chakraborty <chinmoy12c@gmail.com> | 2023-10-02 23:16:21 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-10-03 10:44:36 +0200 |
| commit | 1dae65dc63ae84be5002c37b4ddae0b9220e8808 (patch) | |
| tree | 7f541e24d9b7816e8f6edf6fcb5a676ffb56d345 /docs/topics/testing | |
| parent | 54d9d26ebfc90711430a79219d6547141ce1717f (diff) | |
Fixed #34657 -- Made assert(Not)Contains/assertInHTML display haystacks in error messages.
Diffstat (limited to 'docs/topics/testing')
| -rw-r--r-- | docs/topics/testing/tools.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 16cc7759b3..a171941a85 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1700,6 +1700,10 @@ your test suite. attribute ordering is not significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. + .. versionchanged:: 5.1 + + In older versions, error messages didn't contain the response content. + .. method:: SimpleTestCase.assertNotContains(response, text, status_code=200, msg_prefix='', html=False) Asserts that a :class:`response <django.http.HttpResponse>` produced the @@ -1712,6 +1716,10 @@ your test suite. attribute ordering is not significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. + .. versionchanged:: 5.1 + + In older versions, error messages didn't contain the response content. + .. method:: SimpleTestCase.assertTemplateUsed(response, template_name, msg_prefix='', count=None) Asserts that the template with the given name was used in rendering the @@ -1848,6 +1856,10 @@ your test suite. Whitespace in most cases is ignored, and attribute ordering is not significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. + .. versionchanged:: 5.1 + + In older versions, error messages didn't contain the ``haystack``. + .. method:: SimpleTestCase.assertJSONEqual(raw, expected_data, msg=None) Asserts that the JSON fragments ``raw`` and ``expected_data`` are equal. |
