summaryrefslogtreecommitdiff
path: root/tests/regressiontests/context_processors
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-10-11 12:20:07 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-10-11 12:20:07 +0000
commit1070c57b83efdfd4fbed09280fcdaafc6d9c1a81 (patch)
tree93b5721fe4e0664b993dd0d0b1dee544df304b22 /tests/regressiontests/context_processors
parent5e5be2c44caaae3192a9f8ae1ce0adc0da3d8c4d (diff)
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
Diffstat (limited to 'tests/regressiontests/context_processors')
-rw-r--r--tests/regressiontests/context_processors/tests.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/regressiontests/context_processors/tests.py b/tests/regressiontests/context_processors/tests.py
index 0d19bef7ff..2b5ddbe94c 100644
--- a/tests/regressiontests/context_processors/tests.py
+++ b/tests/regressiontests/context_processors/tests.py
@@ -1,6 +1,7 @@
"""
Tests for Django's bundled context processors.
"""
+import warnings
from django.conf import settings
from django.contrib.auth import authenticate
@@ -46,6 +47,16 @@ class AuthContextProcessorTests(TestCase):
urls = 'regressiontests.context_processors.urls'
fixtures = ['context-processors-users.xml']
+ def setUp(self):
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ module='django.contrib.auth.models')
+ warnings.filterwarnings('ignore', category=DeprecationWarning,
+ module='django.core.context_processors')
+
+ def tearDown(self):
+ warnings.resetwarnings()
+ warnings.simplefilter('ignore', PendingDeprecationWarning)
+
def test_session_not_accessed(self):
"""
Tests that the session is not accessed simply by including