From 5a71bd7f9de5a6251f68561c1ba0a6bc78f2c60c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 21 Nov 2018 17:41:23 -0500 Subject: [PATCH] Removed unused views in middleware_exceptions tests. Unused since d334f46b7a080fd3eb720141c19b37b10704a352. --- tests/middleware_exceptions/urls.py | 4 ---- tests/middleware_exceptions/views.py | 15 +-------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/tests/middleware_exceptions/urls.py b/tests/middleware_exceptions/urls.py index 85c7a785ec..5a77ac6123 100644 --- a/tests/middleware_exceptions/urls.py +++ b/tests/middleware_exceptions/urls.py @@ -4,12 +4,8 @@ from . import views urlpatterns = [ url(r'^middleware_exceptions/view/$', views.normal_view), - url(r'^middleware_exceptions/not_found/$', views.not_found), url(r'^middleware_exceptions/error/$', views.server_error), - url(r'^middleware_exceptions/null_view/$', views.null_view), url(r'^middleware_exceptions/permission_denied/$', views.permission_denied), url(r'^middleware_exceptions/exception_in_render/$', views.exception_in_render), - url(r'^middleware_exceptions/template_response/$', views.template_response), - url(r'^middleware_exceptions/template_response_error/$', views.template_response_error), ] diff --git a/tests/middleware_exceptions/views.py b/tests/middleware_exceptions/views.py index 40bbd0f452..3ae54081ab 100644 --- a/tests/middleware_exceptions/views.py +++ b/tests/middleware_exceptions/views.py @@ -1,5 +1,5 @@ from django.core.exceptions import PermissionDenied -from django.http import Http404, HttpResponse +from django.http import HttpResponse from django.template import engines from django.template.response import TemplateResponse @@ -13,23 +13,10 @@ def template_response(request): return TemplateResponse(request, template, context={'mw': []}) -def template_response_error(request): - template = engines['django'].from_string('{%') - return TemplateResponse(request, template) - - -def not_found(request): - raise Http404() - - def server_error(request): raise Exception('Error in view') -def null_view(request): - return None - - def permission_denied(request): raise PermissionDenied()