diff options
Diffstat (limited to 'tests/test_utils')
| -rw-r--r-- | tests/test_utils/tests.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index 69a99d47d2..5b84bbd383 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -612,6 +612,31 @@ class HTMLEqualTests(SimpleTestCase): '<input type="text" id="id_name" />', '<input type="password" id="id_name" />') + def test_normalize_refs(self): + pairs = [ + (''', '''), + (''', "'"), + (''', '''), + (''', "'"), + ("'", '''), + ("'", '''), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ('&', '&'), + ] + for pair in pairs: + with self.subTest(repr(pair)): + self.assertHTMLEqual(*pair) + def test_complex_examples(self): self.assertHTMLEqual( """<tr><th><label for="id_first_name">First name:</label></th> |
