'Regression for #15315: modelform_factory should accept widgets
argument'

def test_factory_with_widget_argument(self):

    widget = forms.Textarea()
    Form = modelform_factory(Person, fields=u'__all__')
    self.assertNotEqual(Form.base_fields[u'name'].widget.__class__, forms.Textarea)
    Form = modelform_factory(Person, fields=u'__all__', widgets={u'name': widget})
    self.assertEqual(Form.base_fields[u'name'].widget.__class__, forms.Textarea)
