diff options
| author | Tim Graham <timograham@gmail.com> | 2014-11-18 12:09:20 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-01-17 08:13:36 -0500 |
| commit | 37b7776a015102e97b9bdd64d88c732883ff9989 (patch) | |
| tree | df131155304b1904931ba3d15663f610391f1057 /tests/forms_tests | |
| parent | 75f107b8842dfc890ddd65262bd09ca87c3a15be (diff) | |
Removed django.utils.datastructures.MergeDict per deprecation timeline; refs #18659.
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/tests/test_forms.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index c0ce912fe1..d938694e8f 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -18,10 +18,9 @@ from django.forms import ( from django.forms.utils import ErrorList from django.http import QueryDict from django.template import Template, Context -from django.test import TestCase, ignore_warnings +from django.test import TestCase from django.test.utils import str_prefix -from django.utils.datastructures import MultiValueDict, MergeDict -from django.utils.deprecation import RemovedInDjango19Warning +from django.utils.datastructures import MultiValueDict from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe, SafeData @@ -552,11 +551,9 @@ class FormsTestCase(TestCase): <li><label for="composers_id_1"><input type="checkbox" name="composers" value="P" id="composers_id_1" /> Paul McCartney</label></li> </ul>""") - @ignore_warnings(category=RemovedInDjango19Warning) # MergeDict deprecation def test_multiple_choice_list_data(self): - # Data for a MultipleChoiceField should be a list. QueryDict, MultiValueDict and - # MergeDict (when created as a merge of MultiValueDicts) conveniently work with - # this. + # Data for a MultipleChoiceField should be a list. QueryDict and + # MultiValueDict conveniently work with this. class SongForm(Form): name = CharField() composers = MultipleChoiceField(choices=[('J', 'John Lennon'), ('P', 'Paul McCartney')], widget=CheckboxSelectMultiple) @@ -573,11 +570,6 @@ class FormsTestCase(TestCase): f = SongForm(data) self.assertEqual(f.errors, {}) - # MergeDict is deprecated, but is supported until removed. - data = MergeDict(MultiValueDict(dict(name=['Yesterday'], composers=['J', 'P']))) - f = SongForm(data) - self.assertEqual(f.errors, {}) - def test_multiple_hidden(self): class SongForm(Form): name = CharField() |
