1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Removed request.REQUEST per deprecation timeline; refs #18659.

This commit is contained in:
Tim Graham
2014-11-18 11:57:05 -05:00
parent 61ad1ea92b
commit 75f107b884
6 changed files with 6 additions and 74 deletions

View File

@@ -4,7 +4,7 @@ import os
import unittest
import warnings
from django.test import SimpleTestCase, RequestFactory, override_settings
from django.test import SimpleTestCase, override_settings
from django.test.utils import reset_warning_registry
from django.utils import six, translation
from django.utils.deprecation import RenameMethodsBase
@@ -175,26 +175,6 @@ class RenameMethodsTests(SimpleTestCase):
])
class DeprecatingRequestMergeDictTest(SimpleTestCase):
def test_deprecated_request(self):
"""
Ensure the correct warning is raised when WSGIRequest.REQUEST is
accessed.
"""
reset_warning_registry()
with warnings.catch_warnings(record=True) as recorded:
warnings.simplefilter('always')
request = RequestFactory().get('/')
request.REQUEST # evaluate
msgs = [str(warning.message) for warning in recorded]
self.assertEqual(msgs, [
'`request.REQUEST` is deprecated, use `request.GET` or '
'`request.POST` instead.',
'`MergeDict` is deprecated, use `dict.update()` instead.',
])
@override_settings(USE_I18N=True)
class DeprecatedChineseLanguageCodes(SimpleTestCase):
def test_deprecation_warning(self):