diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
index 3cade52..f97027b 100644
a
|
b
|
class FormMixin(object):
|
19 | 19 | """ |
20 | 20 | Returns the initial data to use for forms on this view. |
21 | 21 | """ |
22 | | return self.initial |
| 22 | return dict(self.initial) |
23 | 23 | |
24 | 24 | def get_form_class(self): |
25 | 25 | """ |
diff --git a/tests/regressiontests/generic_views/edit.py b/tests/regressiontests/generic_views/edit.py
index 182615a..d70c786 100644
a
|
b
|
from django.core.urlresolvers import reverse
|
5 | 5 | from django import forms |
6 | 6 | from django.test import TestCase |
7 | 7 | from django.utils.unittest import expectedFailure |
| 8 | from django.views.generic.edit import FormMixin |
8 | 9 | |
9 | 10 | from . import views |
10 | 11 | from .models import Artist, Author |
11 | 12 | |
12 | 13 | |
| 14 | class FormMixinTests(TestCase): |
| 15 | def test_initial_data(self): |
| 16 | """ Test instance independence of initial data dict (see #17759) """ |
| 17 | form_1 = FormMixin() |
| 18 | form_2 = FormMixin() |
| 19 | initial_1 = form_1.get_initial() |
| 20 | initial_1['a'] = 'abc' |
| 21 | self.assertEqual(form_2.get_initial(), {}) |
| 22 | |
13 | 23 | class ModelFormMixinTests(TestCase): |
14 | 24 | def test_get_form(self): |
15 | 25 | form_class = views.AuthorGetQuerySetFormView().get_form_class() |
diff --git a/tests/regressiontests/generic_views/tests.py b/tests/regressiontests/generic_views/tests.py
index d387216..72aab03 100644
a
|
b
|
from .dates import (ArchiveIndexViewTests, YearArchiveViewTests,
|
5 | 5 | MonthArchiveViewTests, WeekArchiveViewTests, DayArchiveViewTests, |
6 | 6 | DateDetailViewTests) |
7 | 7 | from .detail import DetailViewTest |
8 | | from .edit import (ModelFormMixinTests, CreateViewTests, UpdateViewTests, |
9 | | DeleteViewTests) |
| 8 | from .edit import (FormMixinTests, ModelFormMixinTests, CreateViewTests, |
| 9 | UpdateViewTests, DeleteViewTests) |
10 | 10 | from .list import ListViewTests |