summaryrefslogtreecommitdiff
path: root/tests/forms_tests
diff options
context:
space:
mode:
authorThibaut Decombe <thibaut.decombe@gmail.com>2025-01-11 18:37:52 +0100
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2025-01-17 15:55:37 +0100
commit98767ba2eceafa0de10c561d051d54e340c2d29b (patch)
treecd5d3dbd9c29886b5148cb1f227a7ea8bf74483d /tests/forms_tests
parentc41d6c9bb8262dff64fe4ab55e601bc0b269960b (diff)
Fixed invalid HTML in test templates.
Diffstat (limited to 'tests/forms_tests')
-rw-r--r--tests/forms_tests/templates/forms_tests/custom_field.html2
-rw-r--r--tests/forms_tests/tests/test_forms.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/forms_tests/templates/forms_tests/custom_field.html b/tests/forms_tests/templates/forms_tests/custom_field.html
index 5d19c9ed49..eb0ecee6a2 100644
--- a/tests/forms_tests/templates/forms_tests/custom_field.html
+++ b/tests/forms_tests/templates/forms_tests/custom_field.html
@@ -1,3 +1,3 @@
{{ field.label_tag }}
-<p>Custom Field<p>
+<p>Custom Field</p>
{{ field }}
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py
index 20c86754c6..ae19ef1d0c 100644
--- a/tests/forms_tests/tests/test_forms.py
+++ b/tests/forms_tests/tests/test_forms.py
@@ -5371,7 +5371,7 @@ class TemplateTests(SimpleTestCase):
f = MyForm()
self.assertHTMLEqual(
f.render(),
- '<div><label for="id_first_name">First name:</label><p>Custom Field<p>'
+ '<div><label for="id_first_name">First name:</label><p>Custom Field</p>'
'<input type="text" name="first_name" required id="id_first_name"></div>',
)
@@ -5382,7 +5382,7 @@ class TemplateTests(SimpleTestCase):
f = MyForm()
self.assertHTMLEqual(
f["first_name"].render(template_name="forms_tests/custom_field.html"),
- '<label for="id_first_name">First name:</label><p>Custom Field<p>'
+ '<label for="id_first_name">First name:</label><p>Custom Field</p>'
'<input type="text" name="first_name" required id="id_first_name">',
)
@@ -5410,7 +5410,7 @@ class OverrideTests(SimpleTestCase):
html = t.render(Context({"form": Person()}))
expected = """
<label for="id_first_name">First name:</label>
- <p>Custom Field<p>
+ <p>Custom Field</p>
<input type="text" name="first_name" required id="id_first_name">
"""
self.assertHTMLEqual(html, expected)