diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-12-02 23:23:51 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2014-12-28 17:00:07 +0100 |
| commit | 92e8f1f30223d95c0e71ee6ace7bdc476c81abbd (patch) | |
| tree | 19139953edec69f849b0f1ea32821fdc4f38c491 /tests | |
| parent | c599f233b17d3890df8f648f8ead25141c21495c (diff) | |
Moved context_processors from django.core to django.template.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/admin_views/tests.py | 2 | ||||
| -rw-r--r-- | tests/cache/tests.py | 2 | ||||
| -rw-r--r-- | tests/context_processors/tests.py | 4 | ||||
| -rw-r--r-- | tests/context_processors/views.py | 2 | ||||
| -rw-r--r-- | tests/csrf_tests/tests.py | 2 | ||||
| -rw-r--r-- | tests/shortcuts/tests.py | 2 | ||||
| -rw-r--r-- | tests/timezones/tests.py | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 1fc492c810..73564d4f94 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -4344,7 +4344,7 @@ class ValidXHTMLTests(TestCase): @override_settings( TEMPLATE_CONTEXT_PROCESSORS=filter( - lambda t: t != 'django.core.context_processors.i18n', + lambda t: t != 'django.template.context_processors.i18n', global_settings.TEMPLATE_CONTEXT_PROCESSORS), USE_I18N=False, ) diff --git a/tests/cache/tests.py b/tests/cache/tests.py index 9762620afc..be4d52cb05 100644 --- a/tests/cache/tests.py +++ b/tests/cache/tests.py @@ -20,7 +20,6 @@ from django.core import signals from django.core.cache import (cache, caches, CacheKeyWarning, InvalidCacheBackendError, DEFAULT_CACHE_ALIAS, get_cache, close_caches) -from django.core.context_processors import csrf from django.db import connection, connections, transaction from django.core.cache.utils import make_template_fragment_key from django.http import HttpResponse, StreamingHttpResponse @@ -28,6 +27,7 @@ from django.middleware.cache import (FetchFromCacheMiddleware, UpdateCacheMiddleware, CacheMiddleware) from django.middleware.csrf import CsrfViewMiddleware from django.template import Template +from django.template.context_processors import csrf from django.template.response import TemplateResponse from django.test import TestCase, TransactionTestCase, RequestFactory, override_settings from django.test.signals import setting_changed diff --git a/tests/context_processors/tests.py b/tests/context_processors/tests.py index 44f36a4267..8d58f5c695 100644 --- a/tests/context_processors/tests.py +++ b/tests/context_processors/tests.py @@ -7,7 +7,7 @@ from django.test import TestCase, override_settings @override_settings(ROOT_URLCONF='context_processors.urls') class RequestContextProcessorTests(TestCase): """ - Tests for the ``django.core.context_processors.request`` processor. + Tests for the ``django.template.context_processors.request`` processor. """ def test_request_attributes(self): @@ -38,7 +38,7 @@ class RequestContextProcessorTests(TestCase): @override_settings(ROOT_URLCONF='context_processors.urls', DEBUG=True, INTERNAL_IPS=('127.0.0.1',)) class DebugContextProcessorTests(TestCase): """ - Tests for the ``django.core.context_processors.debug`` processor. + Tests for the ``django.template.context_processors.debug`` processor. """ def test_debug(self): diff --git a/tests/context_processors/views.py b/tests/context_processors/views.py index 077d722750..913877f20a 100644 --- a/tests/context_processors/views.py +++ b/tests/context_processors/views.py @@ -1,5 +1,5 @@ -from django.core import context_processors from django.shortcuts import render_to_response +from django.template import context_processors from django.template.context import RequestContext from .models import DebugObject diff --git a/tests/csrf_tests/tests.py b/tests/csrf_tests/tests.py index ee19017515..9c6e2e585d 100644 --- a/tests/csrf_tests/tests.py +++ b/tests/csrf_tests/tests.py @@ -3,10 +3,10 @@ from __future__ import unicode_literals import logging from django.conf import settings -from django.core.context_processors import csrf from django.http import HttpRequest, HttpResponse from django.middleware.csrf import CsrfViewMiddleware, CSRF_KEY_LENGTH from django.template import RequestContext, Template +from django.template.context_processors import csrf from django.test import TestCase, override_settings from django.views.decorators.csrf import csrf_exempt, requires_csrf_token, ensure_csrf_cookie diff --git a/tests/shortcuts/tests.py b/tests/shortcuts/tests.py index 2b55326311..029c150644 100644 --- a/tests/shortcuts/tests.py +++ b/tests/shortcuts/tests.py @@ -4,7 +4,7 @@ from django.test import TestCase, override_settings @override_settings( - TEMPLATE_CONTEXT_PROCESSORS=('django.core.context_processors.static',), + TEMPLATE_CONTEXT_PROCESSORS=('django.template.context_processors.static',), STATIC_URL='/path/to/static/media/', ROOT_URLCONF='shortcuts.urls', ) diff --git a/tests/timezones/tests.py b/tests/timezones/tests.py index ab9ed6b1a1..586e838e37 100644 --- a/tests/timezones/tests.py +++ b/tests/timezones/tests.py @@ -932,7 +932,7 @@ class TemplateTests(TestCase): @skipIf(sys.platform.startswith('win'), "Windows uses non-standard time zone names") def test_tz_template_context_processor(self): """ - Test the django.core.context_processors.tz template context processor. + Test the django.template.context_processors.tz template context processor. """ tpl = Template("{{ TIME_ZONE }}") self.assertEqual(tpl.render(Context()), "") |
