From 37b7776a015102e97b9bdd64d88c732883ff9989 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 18 Nov 2014 12:09:20 -0500 Subject: Removed django.utils.datastructures.MergeDict per deprecation timeline; refs #18659. --- tests/forms_tests/tests/test_forms.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'tests/forms_tests') 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):
  • """) - @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() -- cgit v1.3