From 1070c57b83efdfd4fbed09280fcdaafc6d9c1a81 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Mon, 11 Oct 2010 12:20:07 +0000 Subject: 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 --- tests/regressiontests/context_processors/tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/regressiontests/context_processors') 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 -- cgit v1.3