diff options
| author | Tim Graham <timograham@gmail.com> | 2015-09-03 22:01:30 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-09-23 19:31:11 -0400 |
| commit | 9023696613b278bb96a2ab5744da5c2bac023ad7 (patch) | |
| tree | 5e088d65e7850758c823422513714757ea5c1485 /tests/test_client_regress | |
| parent | b3641512c891b653887a90eca8cd3f987682950f (diff) | |
Removed dictionary and context_instance parameters for render functions.
Per deprecation timeline.
Diffstat (limited to 'tests/test_client_regress')
| -rw-r--r-- | tests/test_client_regress/tests.py | 5 | ||||
| -rw-r--r-- | tests/test_client_regress/views.py | 5 |
2 files changed, 3 insertions, 7 deletions
diff --git a/tests/test_client_regress/tests.py b/tests/test_client_regress/tests.py index 500c28f9ae..0e0892e4e4 100644 --- a/tests/test_client_regress/tests.py +++ b/tests/test_client_regress/tests.py @@ -20,9 +20,7 @@ from django.test import ( from django.test.client import RedirectCycleError, RequestFactory, encode_file from django.test.utils import ContextList, str_prefix from django.utils._os import upath -from django.utils.deprecation import ( - RemovedInDjango20Warning, RemovedInDjango110Warning, -) +from django.utils.deprecation import RemovedInDjango20Warning from django.utils.translation import ugettext_lazy from .models import CustomUser @@ -1064,7 +1062,6 @@ class ContextTests(TestDataMixin, TestCase): 'python', 'dolly'}, l.keys()) - @ignore_warnings(category=RemovedInDjango110Warning) def test_15368(self): # Need to insert a context processor that assumes certain things about # the request instance. This triggers a bug caused by some ways of diff --git a/tests/test_client_regress/views.py b/tests/test_client_regress/views.py index 6ba419833a..8470bb9935 100644 --- a/tests/test_client_regress/views.py +++ b/tests/test_client_regress/views.py @@ -4,8 +4,7 @@ from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseRedirect, JsonResponse -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render, render_to_response from django.template.loader import render_to_string from django.test import Client from django.test.client import CONTENT_TYPE_RE @@ -152,7 +151,7 @@ def read_buffer(request): def request_context_view(request): # Special attribute that won't be present on a plain HttpRequest request.special_path = request.path - return render_to_response('request_context.html', context_instance=RequestContext(request, {})) + return render(request, 'request_context.html') def render_template_multiple_times(request): |
