summaryrefslogtreecommitdiff
path: root/tests/template_backends
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-05 10:25:43 -0400
committerTim Graham <timograham@gmail.com>2015-09-23 19:31:11 -0400
commit9114fe8adabe626619665c9853ba952798da5530 (patch)
tree0c25d35384703efc8c76f1f035a26ed9461a7a6c /tests/template_backends
parent4811f09fa39d5293944dfebfbfaf6849828d2dcd (diff)
downloaddjango-9114fe8adabe626619665c9853ba952798da5530.tar.gz
Removed support for passing a context to a generic Template.render().
Per deprecation timeline; refs a3e783fe11dd25bbf84bfb6201186566ed473506.
Diffstat (limited to 'tests/template_backends')
-rw-r--r--tests/template_backends/test_django.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/tests/template_backends/test_django.py b/tests/template_backends/test_django.py
index 332eeaee25..8d13aaee08 100644
--- a/tests/template_backends/test_django.py
+++ b/tests/template_backends/test_django.py
@@ -1,10 +1,8 @@
from template_tests.test_response import test_processor_name
-from django.template import RequestContext
from django.template.backends.django import DjangoTemplates
from django.template.library import InvalidTemplateLibrary
-from django.test import RequestFactory, ignore_warnings, override_settings
-from django.utils.deprecation import RemovedInDjango110Warning
+from django.test import RequestFactory, override_settings
from .test_dummy import TemplateStringsTests
@@ -36,23 +34,6 @@ class DjangoTemplatesTests(TemplateStringsTests):
content = template.render({'processors': 'no'}, request)
self.assertEqual(content, 'no')
- @ignore_warnings(category=RemovedInDjango110Warning)
- def test_request_context_conflicts_with_request(self):
- template = self.engine.from_string('hello')
-
- request = RequestFactory().get('/')
- request_context = RequestContext(request)
- # This doesn't raise an exception.
- template.render(request_context, request)
-
- other_request = RequestFactory().get('/')
- msg = ("render() was called with a RequestContext and a request "
- "argument which refer to different requests. Make sure "
- "that the context argument is a dict or at least that "
- "the two arguments refer to the same request.")
- with self.assertRaisesMessage(ValueError, msg):
- template.render(request_context, other_request)
-
@override_settings(INSTALLED_APPS=['template_backends.apps.good'])
def test_templatetag_discovery(self):
engine = DjangoTemplates({