mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-16 22:20:24 +00:00
fixing test with modelforms
This commit is contained in:
parent
b341d763f0
commit
84bf9f2073
2 changed files with 5 additions and 4 deletions
|
|
@ -166,7 +166,9 @@ _django_to_floppyforms_widget = {
|
|||
django.forms.extras.widgets.SelectDateWidget:
|
||||
_create_widget(
|
||||
floppyforms.widgets.SelectDateWidget,
|
||||
init_arguments=('years', 'required')),
|
||||
init_arguments=
|
||||
('years',)
|
||||
if django.VERSION >= (1, 7) else ('years', 'required')),
|
||||
}
|
||||
|
||||
_django_field_to_floppyform_widget = {
|
||||
|
|
|
|||
|
|
@ -341,12 +341,11 @@ class GetFloppyformWidgetTest(TestCase):
|
|||
|
||||
widget = forms.extras.widgets.SelectDateWidget(
|
||||
attrs={'attribute': 'value'},
|
||||
years=[2010, 2011, 2012, 2013],
|
||||
required=False)
|
||||
years=[2010, 2011, 2012, 2013])
|
||||
self.assertExpectWidget(
|
||||
widget,
|
||||
floppyforms.widgets.SelectDateWidget,
|
||||
('attrs', 'years', 'required'))
|
||||
('attrs', 'years'))
|
||||
|
||||
|
||||
class ModelFormTest(TestCase):
|
||||
|
|
|
|||
Loading…
Reference in a new issue