mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Fixed #27037 -- Prevented required attribute on ClearableFileInput when initial data exists.
This commit is contained in:
@@ -76,3 +76,9 @@ class TextInputTest(WidgetTest):
|
||||
def test_attrs_safestring(self):
|
||||
widget = TextInput(attrs={'onBlur': mark_safe("function('foo')")})
|
||||
self.check_html(widget, 'email', '', html='<input onBlur="function(\'foo\')" type="text" name="email" />')
|
||||
|
||||
def test_use_required_attribute(self):
|
||||
# Text inputs can safely trigger the browser validation.
|
||||
self.assertIs(self.widget.use_required_attribute(None), True)
|
||||
self.assertIs(self.widget.use_required_attribute(''), True)
|
||||
self.assertIs(self.widget.use_required_attribute('resume.txt'), True)
|
||||
|
||||
Reference in New Issue
Block a user