diff options
Diffstat (limited to 'tests/test_utils')
| -rw-r--r-- | tests/test_utils/tests.py | 7 | ||||
| -rw-r--r-- | tests/test_utils/urls.py | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py index 320531e32c..e9aa9d9c98 100644 --- a/tests/test_utils/tests.py +++ b/tests/test_utils/tests.py @@ -5,7 +5,6 @@ from io import StringIO from unittest import mock from django.conf import settings -from django.conf.urls import url from django.contrib.staticfiles.finders import get_finder, get_finders from django.contrib.staticfiles.storage import staticfiles_storage from django.core.files.storage import default_storage @@ -22,7 +21,7 @@ from django.test.utils import ( CaptureQueriesContext, TestContextDecorator, isolate_apps, override_settings, setup_test_environment, ) -from django.urls import NoReverseMatch, reverse +from django.urls import NoReverseMatch, path, reverse from .models import Car, Person, PossessedCar from .views import empty_response @@ -962,11 +961,11 @@ class AssertURLEqualTests(SimpleTestCase): class FirstUrls: - urlpatterns = [url(r'first/$', empty_response, name='first')] + urlpatterns = [path('first/', empty_response, name='first')] class SecondUrls: - urlpatterns = [url(r'second/$', empty_response, name='second')] + urlpatterns = [path('second/', empty_response, name='second')] class SetupTestEnvironmentTests(SimpleTestCase): diff --git a/tests/test_utils/urls.py b/tests/test_utils/urls.py index a886451721..5cfab5d831 100644 --- a/tests/test_utils/urls.py +++ b/tests/test_utils/urls.py @@ -1,8 +1,8 @@ -from django.conf.urls import url +from django.urls import path from . import views urlpatterns = [ - url(r'^test_utils/get_person/([0-9]+)/$', views.get_person), - url(r'^test_utils/no_template_used/$', views.no_template_used), + path('test_utils/get_person/<int:pk>/', views.get_person), + path('test_utils/no_template_used/', views.no_template_used), ] |
