mirror of
https://github.com/django/django.git
synced 2025-11-25 13:13:28 +00:00
Fixed invalid HTML in test templates.
This commit is contained in:
parent
c41d6c9bb8
commit
98767ba2ec
3 changed files with 5 additions and 4 deletions
|
|
@ -1,3 +1,3 @@
|
|||
{{ field.label_tag }}
|
||||
<p>Custom Field<p>
|
||||
<p>Custom Field</p>
|
||||
{{ field }}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<head>
|
||||
<script src="/jsi18n/app1/"></script>
|
||||
<script src="/jsi18n/app2/"></script>
|
||||
</head>
|
||||
<body>
|
||||
<p id="app1string">
|
||||
<script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue