mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #32556 -- Fixed assertHTMLEqual() to handle empty string as boolean attributes value.
This commit is contained in:
parent
f6713cda89
commit
9bf5e9418f
2 changed files with 8 additions and 2 deletions
|
@ -714,6 +714,12 @@ class HTMLEqualTests(SimpleTestCase):
|
|||
with self.subTest(html1):
|
||||
self.assertHTMLEqual(html1, html2)
|
||||
|
||||
def test_boolean_attribute(self):
|
||||
html1 = '<input attr>'
|
||||
html2 = '<input attr="">'
|
||||
self.assertHTMLEqual(html1, html2)
|
||||
self.assertEqual(parse_html(html1), parse_html(html2))
|
||||
|
||||
def test_normalize_refs(self):
|
||||
pairs = [
|
||||
(''', '''),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue