mirror of
https://github.com/django/django.git
synced 2025-10-27 18:27:00 +00:00
Fixed #20684 -- Added support for HTML5 boolean attributes to form widgets.
This commit is contained in:
parent
684e8a941b
commit
e61d99d96d
4 changed files with 30 additions and 16 deletions
|
|
@ -20,6 +20,9 @@ class FormsUtilTestCase(TestCase):
|
|||
|
||||
self.assertEqual(flatatt({'id': "header"}), ' id="header"')
|
||||
self.assertEqual(flatatt({'class': "news", 'title': "Read this"}), ' class="news" title="Read this"')
|
||||
self.assertEqual(flatatt({'class': "news", 'title': "Read this", 'required': "required"}), ' class="news" required="required" title="Read this"')
|
||||
self.assertEqual(flatatt({'class': "news", 'title': "Read this", 'required': True}), ' class="news" title="Read this" required')
|
||||
self.assertEqual(flatatt({'class': "news", 'title': "Read this", 'required': False}), ' class="news" title="Read this"')
|
||||
self.assertEqual(flatatt({}), '')
|
||||
|
||||
def test_validation_error(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue