|
1 | 1 | fromdatetimeimporttimedelta |
2 | 2 |
|
3 | | -fromdjango.conf.urlsimportinclude, url |
| 3 | +fromdjango.conf.urlsimportinclude |
4 | 4 | fromdjango.contrib.authimportget_user_model |
5 | 5 | fromdjango.core.exceptionsimportImproperlyConfigured |
6 | 6 | fromdjango.httpimportHttpResponse |
7 | 7 | fromdjango.testimportTestCase |
8 | 8 | fromdjango.test.utilsimportoverride_settings |
| 9 | +fromdjango.urlsimportpath, re_path |
9 | 10 | fromdjango.utilsimporttimezone |
10 | 11 | fromrest_frameworkimportpermissions |
11 | 12 | fromrest_framework.authenticationimportBaseAuthentication |
@@ -109,17 +110,17 @@ class AuthenticationNoneOAuth2View(MockView): |
109 | 110 |
|
110 | 111 |
|
111 | 112 | urlpatterns= [ |
112 | | -url(r"^oauth2/", include("oauth2_provider.urls")), |
113 | | -url(r"^oauth2-test/$", OAuth2View.as_view()), |
114 | | -url(r"^oauth2-scoped-test/$", ScopedView.as_view()), |
115 | | -url(r"^oauth2-scoped-missing-auth/$", TokenHasScopeViewWrongAuth.as_view()), |
116 | | -url(r"^oauth2-read-write-test/$", ReadWriteScopedView.as_view()), |
117 | | -url(r"^oauth2-resource-scoped-test/$", ResourceScopedView.as_view()), |
118 | | -url(r"^oauth2-authenticated-or-scoped-test/$", AuthenticatedOrScopedView.as_view()), |
119 | | -url(r"^oauth2-method-scope-test/.*$", MethodScopeAltView.as_view()), |
120 | | -url(r"^oauth2-method-scope-fail/$", MethodScopeAltViewBad.as_view()), |
121 | | -url(r"^oauth2-method-scope-missing-auth/$", MethodScopeAltViewWrongAuth.as_view()), |
122 | | -url(r"^oauth2-authentication-none/$", AuthenticationNoneOAuth2View.as_view()), |
| 113 | +path("oauth2/", include("oauth2_provider.urls")), |
| 114 | +path("oauth2-test/", OAuth2View.as_view()), |
| 115 | +path("oauth2-scoped-test/", ScopedView.as_view()), |
| 116 | +path("oauth2-scoped-missing-auth/", TokenHasScopeViewWrongAuth.as_view()), |
| 117 | +path("oauth2-read-write-test/", ReadWriteScopedView.as_view()), |
| 118 | +path("oauth2-resource-scoped-test/", ResourceScopedView.as_view()), |
| 119 | +path("oauth2-authenticated-or-scoped-test/", AuthenticatedOrScopedView.as_view()), |
| 120 | +re_path(r"oauth2-method-scope-test/.*$", MethodScopeAltView.as_view()), |
| 121 | +path("oauth2-method-scope-fail/", MethodScopeAltViewBad.as_view()), |
| 122 | +path("oauth2-method-scope-missing-auth/", MethodScopeAltViewWrongAuth.as_view()), |
| 123 | +path("oauth2-authentication-none/", AuthenticationNoneOAuth2View.as_view()), |
123 | 124 | ] |
124 | 125 |
|
125 | 126 |
|
|
0 commit comments