1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-10-11 12:20:07 +00:00
parent 5e5be2c44c
commit 1070c57b83
36 changed files with 98 additions and 146 deletions

View File

@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import warnings
from django.test import TestCase
from django.http import HttpRequest, HttpResponse
@@ -69,6 +70,14 @@ class CsrfMiddlewareTest(TestCase):
_session_id = "1"
_secret_key_for_session_test= "test"
def setUp(self):
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='django.middleware.csrf')
def tearDown(self):
warnings.resetwarnings()
warnings.simplefilter('ignore', PendingDeprecationWarning)
def _get_GET_no_csrf_cookie_request(self):
return TestingHttpRequest()