mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[1.0.X] Fixed #10522: accept tuples in generic_inlineformset_factor(exclude). Thanks, mk. Backport of r10375 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10376 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
from django.test import TestCase
|
||||
from django.conf import settings
|
||||
from django.contrib.contenttypes.generic import generic_inlineformset_factory
|
||||
|
||||
# local test models
|
||||
from models import Episode, Media
|
||||
@@ -71,3 +72,8 @@ class GenericAdminViewTest(TestCase):
|
||||
}
|
||||
response = self.client.post('/generic_inline_admin/admin/generic_inline_admin/episode/1/', post_data)
|
||||
self.failUnlessEqual(response.status_code, 302) # redirect somewhere
|
||||
|
||||
def testGenericInlineFormsetFactory(self):
|
||||
# Regression test for #10522.
|
||||
inline_formset = generic_inlineformset_factory(Media,
|
||||
exclude=('url',))
|
||||
|
||||
Reference in New Issue
Block a user