Removed unused views in middleware_exceptions tests.
Unused since d334f46b7a
.
This commit is contained in:
parent
d5f4ce9849
commit
5a71bd7f9d
|
@ -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),
|
||||
]
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue