From 7e2c87809ca601b7290203dd54ba3e9f90a702bd Mon Sep 17 00:00:00 2001 From: gyx1000 Date: Thu, 29 May 2014 17:15:01 +0200 Subject: Fixed #22684 -- Amended SelectDateWidget.empty_label to accept a tuple of values. Thanks danielsamuels for the report --- tests/forms_tests/tests/test_extra.py | 71 ++++++++++++++++++++++++++++++++--- 1 file changed, 66 insertions(+), 5 deletions(-) (limited to 'tests/forms_tests') diff --git a/tests/forms_tests/tests/test_extra.py b/tests/forms_tests/tests/test_extra.py index 499db79014..3f6208fade 100644 --- a/tests/forms_tests/tests/test_extra.py +++ b/tests/forms_tests/tests/test_extra.py @@ -297,11 +297,6 @@ class FormsExtraTestCase(TestCase, AssertFormErrorsMixin): """) - w = SelectDateWidget(years=('2014',), empty_label='empty_label') - - # Rendering the default state with empty_label setted. - self.assertInHTML('', w.render('mydate', ''), count=3) - a = GetDate({'mydate_month': '4', 'mydate_day': '1', 'mydate_year': '2008'}) self.assertTrue(a.is_valid()) self.assertEqual(a.cleaned_data['mydate'], datetime.date(2008, 4, 1)) @@ -325,6 +320,72 @@ class FormsExtraTestCase(TestCase, AssertFormErrorsMixin): d = GetDate({'mydate_month': '1', 'mydate_day': '1', 'mydate_year': '2010'}) self.assertTrue('