summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/5.1.txt5
-rw-r--r--docs/topics/testing/tools.txt12
2 files changed, 16 insertions, 1 deletions
diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt
index a8f0c32f9b..aa8fe80aac 100644
--- a/docs/releases/5.1.txt
+++ b/docs/releases/5.1.txt
@@ -201,7 +201,10 @@ Templates
Tests
~~~~~
-* ...
+* :meth:`~django.test.SimpleTestCase.assertContains`,
+ :meth:`~django.test.SimpleTestCase.assertNotContains`, and
+ :meth:`~django.test.SimpleTestCase.assertInHTML` assertions now add haystacks
+ to assertion error messages.
URLs
~~~~
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.