mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #14797 -- Corrected the handling of get_form_class() when a custom queryset has been defined, but a model hasn't. Thanks to Gabriel Grant for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -7,6 +7,10 @@ from django.utils.unittest import expectedFailure
|
||||
from regressiontests.generic_views.models import Artist, Author
|
||||
from regressiontests.generic_views import views
|
||||
|
||||
class ModelFormMixinTests(TestCase):
|
||||
def test_get_form(self):
|
||||
form_class = views.AuthorGetQuerySetFormView().get_form_class()
|
||||
self.assertEqual(form_class.Meta.model, Author)
|
||||
|
||||
class CreateViewTests(TestCase):
|
||||
urls = 'regressiontests.generic_views.urls'
|
||||
|
||||
Reference in New Issue
Block a user