mirror of
https://github.com/django/django.git
synced 2025-11-25 21:22:14 +00:00
Deprecated some arguments of django.shortcuts.render(_to_response).
dictionary and context_instance and superseded by context. Refactored tests that relied context_instance with more modern idioms.
This commit is contained in:
parent
a0141f9eac
commit
fdbfc98003
12 changed files with 137 additions and 92 deletions
|
|
@ -4,7 +4,10 @@ Tests for Django's bundled context processors.
|
|||
from django.test import TestCase, override_settings
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='context_processors.urls')
|
||||
@override_settings(
|
||||
ROOT_URLCONF='context_processors.urls',
|
||||
TEMPLATE_CONTEXT_PROCESSORS=('django.template.context_processors.request',),
|
||||
)
|
||||
class RequestContextProcessorTests(TestCase):
|
||||
"""
|
||||
Tests for the ``django.template.context_processors.request`` processor.
|
||||
|
|
@ -35,7 +38,12 @@ class RequestContextProcessorTests(TestCase):
|
|||
self.assertContains(response, url)
|
||||
|
||||
|
||||
@override_settings(ROOT_URLCONF='context_processors.urls', DEBUG=True, INTERNAL_IPS=('127.0.0.1',))
|
||||
@override_settings(
|
||||
DEBUG=True,
|
||||
INTERNAL_IPS=('127.0.0.1',),
|
||||
ROOT_URLCONF='context_processors.urls',
|
||||
TEMPLATE_CONTEXT_PROCESSORS=('django.template.context_processors.debug',),
|
||||
)
|
||||
class DebugContextProcessorTests(TestCase):
|
||||
"""
|
||||
Tests for the ``django.template.context_processors.debug`` processor.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue