summaryrefslogtreecommitdiff
path: root/tests/handlers
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2018-12-07 17:52:28 -0500
committerTim Graham <timograham@gmail.com>2018-12-31 10:47:32 -0500
commit043bd709425149b8eff3fb821cba5c23aaebd0df (patch)
tree7624be405a6a6e5a041e2852251ef76e9d28fa7d /tests/handlers
parent1136d57f01ce3e3efab44163ccd7b3b34ec4207f (diff)
downloaddjango-043bd709425149b8eff3fb821cba5c23aaebd0df.tar.gz
Updated test URL patterns to use path() and re_path().
Diffstat (limited to 'tests/handlers')
-rw-r--r--tests/handlers/tests_custom_error_handlers.py4
-rw-r--r--tests/handlers/urls.py15
2 files changed, 9 insertions, 10 deletions
diff --git a/tests/handlers/tests_custom_error_handlers.py b/tests/handlers/tests_custom_error_handlers.py
index 3821783f79..30938bfb22 100644
--- a/tests/handlers/tests_custom_error_handlers.py
+++ b/tests/handlers/tests_custom_error_handlers.py
@@ -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
diff --git a/tests/handlers/urls.py b/tests/handlers/urls.py
index 015527ac51..b008395267 100644
--- a/tests/handlers/urls.py
+++ b/tests/handlers/urls.py
@@ -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),
]