Skip to content

Commit ba70084

Browse files
Use re_path in tests due to Django 4.0 deprecation (#280)
* re_path was introduced in Django 2.0
1 parent 33c1eca commit ba70084

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/urls.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
from django.conf.urls import url
1+
from django.urls import re_path
22

33
from rest_framework_simplejwt import views as jwt_views
44

55
from . import views
66

77
urlpatterns = [
8-
url(r'^token/pair/$', jwt_views.token_obtain_pair, name='token_obtain_pair'),
9-
url(r'^token/refresh/$', jwt_views.token_refresh, name='token_refresh'),
8+
re_path(r'^token/pair/$', jwt_views.token_obtain_pair, name='token_obtain_pair'),
9+
re_path(r'^token/refresh/$', jwt_views.token_refresh, name='token_refresh'),
1010

11-
url(r'^token/sliding/$', jwt_views.token_obtain_sliding, name='token_obtain_sliding'),
12-
url(r'^token/sliding/refresh/$', jwt_views.token_refresh_sliding, name='token_refresh_sliding'),
11+
re_path(r'^token/sliding/$', jwt_views.token_obtain_sliding, name='token_obtain_sliding'),
12+
re_path(r'^token/sliding/refresh/$', jwt_views.token_refresh_sliding, name='token_refresh_sliding'),
1313

14-
url(r'^token/verify/$', jwt_views.token_verify, name='token_verify'),
14+
re_path(r'^token/verify/$', jwt_views.token_verify, name='token_verify'),
1515

16-
url(r'^test-view/$', views.test_view, name='test_view'),
16+
re_path(r'^test-view/$', views.test_view, name='test_view'),
1717
]

0 commit comments

Comments
 (0)