mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #34657 -- Made assert(Not)Contains/assertInHTML display haystacks in error messages.
This commit is contained in:
parent
54d9d26ebf
commit
1dae65dc63
5 changed files with 157 additions and 31 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue