mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24643 -- Added get_context_data() method to FormMixin
This commit is contained in:
committed by
Tim Graham
parent
a37dcfd0a3
commit
8a1824d465
@@ -81,6 +81,13 @@ class FormMixinTests(TestCase):
|
||||
MissingDefaultValue().get_form(), forms.Form,
|
||||
)
|
||||
|
||||
def test_get_context_data(self):
|
||||
class FormContext(FormMixin):
|
||||
request = RequestFactory().get('/')
|
||||
form_class = forms.Form
|
||||
|
||||
self.assertIsInstance(FormContext().get_context_data()['form'], forms.Form)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='generic_views.urls')
|
||||
class BasicFormTests(TestCase):
|
||||
|
||||
Reference in New Issue
Block a user