mirror of
https://github.com/django/django.git
synced 2025-05-21 22:36:28 +00:00
Completed test coverage for BoundField.css_classes().
This commit is contained in:
parent
a350bfa6f4
commit
c8c9dbfc63
@ -3151,6 +3151,14 @@ Good luck picking a username that doesn't already exist.</p>
|
|||||||
self.assertEqual(f['first_name'].widget_type, 'text')
|
self.assertEqual(f['first_name'].widget_type, 'text')
|
||||||
self.assertEqual(f['birthday'].widget_type, 'splithiddendatetime')
|
self.assertEqual(f['birthday'].widget_type, 'splithiddendatetime')
|
||||||
|
|
||||||
|
def test_boundfield_css_classes(self):
|
||||||
|
form = Person()
|
||||||
|
field = form['first_name']
|
||||||
|
self.assertEqual(field.css_classes(), '')
|
||||||
|
self.assertEqual(field.css_classes(extra_classes=''), '')
|
||||||
|
self.assertEqual(field.css_classes(extra_classes='test'), 'test')
|
||||||
|
self.assertEqual(field.css_classes(extra_classes='test test'), 'test')
|
||||||
|
|
||||||
def test_label_tag_override(self):
|
def test_label_tag_override(self):
|
||||||
"""
|
"""
|
||||||
BoundField label_suffix (if provided) overrides Form label_suffix
|
BoundField label_suffix (if provided) overrides Form label_suffix
|
||||||
|
Loading…
x
Reference in New Issue
Block a user