1
0
mirror of https://github.com/django/django.git synced 2025-10-26 15:16:09 +00:00

[1.10.x] Fixed #27186 -- Fixed model form default fallback for MultiWidget, FileInput, SplitDateTimeWidget, SelectDateWidget, and SplitArrayWidget.

Thanks Matt Westcott for the review.

Backport of 3507d4e773 from master
This commit is contained in:
Tim Graham
2016-09-06 17:41:54 -04:00
parent 190cd0e49f
commit 0b59ea3343
15 changed files with 178 additions and 13 deletions

View File

@@ -14,3 +14,7 @@ class FileInputTest(WidgetTest):
self.check_html(self.widget, 'email', 'test@example.com', html='<input type="file" name="email" />')
self.check_html(self.widget, 'email', '', html='<input type="file" name="email" />')
self.check_html(self.widget, 'email', None, html='<input type="file" name="email" />')
def test_value_omitted_from_data(self):
self.assertIs(self.widget.value_omitted_from_data({}, {}, 'field'), True)
self.assertIs(self.widget.value_omitted_from_data({}, {'field': 'value'}, 'field'), False)