1
0
mirror of https://github.com/django/django.git synced 2025-08-25 11:19:12 +00:00

[4.2.x] Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors following Python's HTMLParser fixed parsing.

Further details about Python changes can be found in:
0243f97cba.

Refs #36499. Thank you Clifford Gama for the thorough review!

Backport of e4515dad7a6d953c0bd2414127ba36e1446ff41a from main.
This commit is contained in:
Natalia 2025-07-21 15:23:32 -03:00 committed by nessita
parent 7335a1a913
commit 2a79837e19

View File

@ -966,7 +966,7 @@ class HTMLEqualTests(SimpleTestCase):
"('Unexpected end tag `div` (Line 1, Column 6)', (1, 6))"
)
with self.assertRaisesMessage(AssertionError, error_msg):
self.assertHTMLEqual("< div></ div>", "<div></div>")
self.assertHTMLEqual("< div></div>", "<div></div>")
with self.assertRaises(HTMLParseError):
parse_html("</p>")