summaryrefslogtreecommitdiff
path: root/tests/forms_tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-26 14:43:46 -0400
committerTim Graham <timograham@gmail.com>2013-07-26 14:47:58 -0400
commitdbbd2b1272e5a3ce7ab4b39b9a74f4ea725b104f (patch)
tree282b5d7eb215cc6ef471898571dd17666abdf4ad /tests/forms_tests
parent5cc1ea4773f628f93dd2db9d353dc6b980e4a3ab (diff)
[1.6.x] Fixed #20805 -- Removed an extra colon beside checkboxes in the admin.
Thanks CollinAnderson for the report. Backport of 8676318d2d from master
Diffstat (limited to 'tests/forms_tests')
-rw-r--r--tests/forms_tests/tests/test_forms.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py
index 633fde5026..c77181273c 100644
--- a/tests/forms_tests/tests/test_forms.py
+++ b/tests/forms_tests/tests/test_forms.py
@@ -1870,3 +1870,13 @@ class FormsTestCase(TestCase):
boundfield = SomeForm()['field']
self.assertHTMLEqual(boundfield.label_tag(), '<label for="id_field"></label>')
+
+ def test_label_tag_override(self):
+ """
+ BoundField label_suffix (if provided) overrides Form label_suffix
+ """
+ class SomeForm(Form):
+ field = CharField()
+ boundfield = SomeForm(label_suffix='!')['field']
+
+ self.assertHTMLEqual(boundfield.label_tag(label_suffix='$'), '<label for="id_field">Field$</label>')