diff options
| author | Bouke Haarsma <bouke@webatoom.nl> | 2013-10-15 22:36:49 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-17 09:42:28 -0400 |
| commit | 2fb5a51fa3ac276efc7121ec9de91f092a986104 (patch) | |
| tree | 77f8d7072b079cb9cddb1e8e05bb613681705f7b /tests/forms_tests | |
| parent | 98788d3c3af9f6cce2b94c276d17726f46608b08 (diff) | |
Fixed #18659 -- Deprecated request.REQUEST and MergeDict
Thanks Aymeric Augustin for the suggestion.
Diffstat (limited to 'tests/forms_tests')
| -rw-r--r-- | tests/forms_tests/tests/test_forms.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/forms_tests/tests/test_forms.py b/tests/forms_tests/tests/test_forms.py index 33cf24f7c6..e971860909 100644 --- a/tests/forms_tests/tests/test_forms.py +++ b/tests/forms_tests/tests/test_forms.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals import copy import datetime +import warnings from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator @@ -560,9 +561,12 @@ class FormsTestCase(TestCase): f = SongForm(data) self.assertEqual(f.errors, {}) - data = MergeDict(MultiValueDict(dict(name=['Yesterday'], composers=['J', 'P']))) - f = SongForm(data) - self.assertEqual(f.errors, {}) + # MergeDict is deprecated, but is supported until removed. + with warnings.catch_warnings(record=True): + warnings.simplefilter("always") + data = MergeDict(MultiValueDict(dict(name=['Yesterday'], composers=['J', 'P']))) + f = SongForm(data) + self.assertEqual(f.errors, {}) def test_multiple_hidden(self): class SongForm(Form): |
