diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/4.0.txt | 4 | ||||
| -rw-r--r-- | docs/topics/testing/tools.txt | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/docs/releases/4.0.txt b/docs/releases/4.0.txt index 6f10124c0c..2b82c62d02 100644 --- a/docs/releases/4.0.txt +++ b/docs/releases/4.0.txt @@ -362,6 +362,10 @@ Miscellaneous ``EmailMessage.attach()`` with an invalid ``content`` or ``mimetype`` arguments now raise ``ValueError`` instead of ``AssertionError``. +* :meth:`~django.test.SimpleTestCase.assertHTMLEqual` no longer considers a + non-boolean attribute without a value equal to an attribute with the same + name and value. + .. _deprecated-features-4.0: Features deprecated in 4.0 diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index 70b7f2df5c..02da186aa2 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1596,8 +1596,8 @@ your test suite. closed or the HTML document ends. * Empty tags are equivalent to their self-closing version. * The ordering of attributes of an HTML element is not significant. - * Attributes without an argument are equal to attributes that equal in - name and value (see the examples). + * Boolean attributes (like ``checked``) without an argument are equal to + attributes that equal in name and value (see the examples). * Text, character references, and entity references that refer to the same character are equivalent. @@ -1620,6 +1620,12 @@ your test suite. Output in case of error can be customized with the ``msg`` argument. + .. versionchanged:: 4.0 + + In older versions, any attribute (not only boolean attributes) without + a value was considered equal to an attribute with the same name and + value. + .. method:: SimpleTestCase.assertHTMLNotEqual(html1, html2, msg=None) Asserts that the strings ``html1`` and ``html2`` are *not* equal. The |
