mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user