diff options
| author | Nicolas Lupien <nicolas@expedibox.com> | 2023-12-20 11:49:47 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-12-22 08:27:59 +0100 |
| commit | 2bf46c3825ad4ec170324791d6f3a329316ae2d4 (patch) | |
| tree | 18ef6877e7fadf81f6554d5aa12142fba53effdf /docs/topics/testing | |
| parent | 5c6906cef4d4858bfe8d00de94eb797aa40b31fd (diff) | |
Fixed #34658 -- Added SimpleTestCase.assertNotInHTML().
Diffstat (limited to 'docs/topics/testing')
| -rw-r--r-- | docs/topics/testing/tools.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/topics/testing/tools.txt b/docs/topics/testing/tools.txt index b01dd35b8c..068e452ad0 100644 --- a/docs/topics/testing/tools.txt +++ b/docs/topics/testing/tools.txt @@ -1905,6 +1905,16 @@ your test suite. In older versions, error messages didn't contain the ``haystack``. +.. method:: SimpleTestCase.assertNotInHTML(needle, haystack, msg_prefix="") + + .. versionadded:: 5.1 + + Asserts that the HTML fragment ``needle`` is *not* contained in the + ``haystack``. + + Whitespace in most cases is ignored, and attribute ordering is not + significant. See :meth:`~SimpleTestCase.assertHTMLEqual` for more details. + .. method:: SimpleTestCase.assertJSONEqual(raw, expected_data, msg=None) Asserts that the JSON fragments ``raw`` and ``expected_data`` are equal. |
