diff options
author | Hasan Ramezani <hasan.r67@gmail.com> | 2021-03-18 11:04:43 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-03-18 16:30:15 +0100 |
commit | 9bf5e9418f425666726559c9f1981a516da30aab (patch) | |
tree | 9007c16942d459dc5adb0674f343d869c606a7b5 /tests | |
parent | f6713cda89d323565cfdc867c977c3363edcfc3c (diff) | |
download | django-9bf5e9418f425666726559c9f1981a516da30aab.tar.gz |
Fixed #32556 -- Fixed assertHTMLEqual() to handle empty string as boolean attributes value.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_utils/tests.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index e998573722..137a6e2e1f 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -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 = [ (''', '''), |