summaryrefslogtreecommitdiff
path: root/tests/forms_tests
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2013-06-18 17:49:45 +0200
committerBaptiste Mispelon <bmispelon@gmail.com>2013-06-18 17:49:53 +0200
commit3128f3d38d1db0bc01da9a4bf4be81119079d73a (patch)
tree57e5f7056a17a807f25a5f7872bfdc72d3067533 /tests/forms_tests
parentee77d4b25360a9fc050c32769a334fd69a011a63 (diff)
Fixed #20618 -- Fixed regression in `BoundField.label_tag`.
Diffstat (limited to 'tests/forms_tests')
-rw-r--r--tests/forms_tests/tests/test_forms.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py
index 3b722e5ac1..633fde5026 100644
--- a/tests/forms_tests/tests/test_forms.py
+++ b/tests/forms_tests/tests/test_forms.py
@@ -1863,3 +1863,10 @@ class FormsTestCase(TestCase):
form = SomeForm()
self.assertHTMLEqual(form['custom'].label_tag(), '<label for="custom_id_custom">Custom:</label>')
self.assertHTMLEqual(form['empty'].label_tag(), '<label>Empty:</label>')
+
+ def test_boundfield_empty_label(self):
+ class SomeForm(Form):
+ field = CharField(label='')
+ boundfield = SomeForm()['field']
+
+ self.assertHTMLEqual(boundfield.label_tag(), '<label for="id_field"></label>')