Updated test URL patterns to use path() and re_path().

This commit is contained in:
Tim Graham 2018-12-07 17:52:28 -05:00
parent 1136d57f01
commit 043bd70942
104 changed files with 692 additions and 673 deletions

View file

@ -1,7 +1,7 @@
from django.conf.urls import url
from django.core.exceptions import PermissionDenied
from django.template.response import TemplateResponse
from django.test import SimpleTestCase, modify_settings, override_settings
from django.urls import path
class MiddlewareAccessingContent:
@ -25,7 +25,7 @@ def permission_denied_view(request):
urlpatterns = [
url(r'^$', permission_denied_view),
path('', permission_denied_view),
]
handler403 = template_response_error_handler

View file

@ -1,16 +1,15 @@
from django.conf.urls import url
from django.urls import path
from . import views
urlpatterns = [
url(r'^regular/$', views.regular),
path('regular/', views.regular),
path('no_response_fbv/', views.no_response),
path('no_response_cbv/', views.NoResponse()),
url(r'^streaming/$', views.streaming),
url(r'^in_transaction/$', views.in_transaction),
url(r'^not_in_transaction/$', views.not_in_transaction),
url(r'^suspicious/$', views.suspicious),
url(r'^malformed_post/$', views.malformed_post),
url(r'^httpstatus_enum/$', views.httpstatus_enum),
path('streaming/', views.streaming),
path('in_transaction/', views.in_transaction),
path('not_in_transaction/', views.not_in_transaction),
path('suspicious/', views.suspicious),
path('malformed_post/', views.malformed_post),
path('httpstatus_enum/', views.httpstatus_enum),
]