diff options
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/tests/test_forms.py | 7 |
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>') |
