mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[soc2009/multidb] Merged up to trunk r11756.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -140,3 +140,13 @@ class InlineFormsetTests(TestCase):
|
||||
self.assertEqual(manager[1]['name'], 'Terry Gilliam')
|
||||
else:
|
||||
self.fail('Errors found on formset:%s' % form_set.errors)
|
||||
|
||||
def test_formset_with_none_instance(self):
|
||||
"A formset with instance=None can be created. Regression for #11872"
|
||||
Form = modelform_factory(User)
|
||||
FormSet = inlineformset_factory(User, UserSite)
|
||||
|
||||
# Instantiate the Form and FormSet to prove
|
||||
# you can create a formset with an instance of None
|
||||
form = Form(instance=None)
|
||||
formset = FormSet(instance=None)
|
||||
|
||||
Reference in New Issue
Block a user