mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +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['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):
|
||||
"""
|
||||
BoundField label_suffix (if provided) overrides Form label_suffix
|
||||
|
Loading…
Reference in New Issue
Block a user