File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424from unittest import skipIf
2525from urllib .parse import urlsplit
2626
27- import django .contrib .auth .views
2827from django .urls import reverse as urlreverse
2928from django .contrib .auth .models import User
3029from django .conf import settings
@@ -91,7 +90,7 @@ def test_login_and_logout(self):
9190 self .assertEqual (urlsplit (r ["Location" ])[2 ], urlreverse (ietf .ietfauth .views .profile ))
9291
9392 # try logging out
94- r = self .client .get (urlreverse (django .contrib .auth .views .logout ))
93+ r = self .client .get (urlreverse (' django.contrib.auth.views.logout' ))
9594 self .assertEqual (r .status_code , 200 )
9695
9796 r = self .client .get (urlreverse (ietf .ietfauth .views .profile ))
@@ -198,7 +197,7 @@ def test_create_whitelisted_account(self):
198197 self .assertContains (r , "Whitelist entry creation successful" )
199198
200199 # log out
201- r = self .client .get (urlreverse (django .contrib .auth .views .logout ))
200+ r = self .client .get (urlreverse (' django.contrib.auth.views.logout' ))
202201 self .assertEqual (r .status_code , 200 )
203202
204203 # register and verify whitelisted email
Original file line number Diff line number Diff line change 11# Copyright The IETF Trust 2007-2019, All Rights Reserved
22# Copyright The IETF Trust 2007, 2009, All Rights Reserved
33
4- from django .contrib .auth .views import logout # type: ignore
4+ from django .contrib .auth .views import LogoutView # type: ignore
55
66from ietf .ietfauth import views
77from ietf .utils .urls import url
1515 url (r'^create/$' , views .create_account ),
1616 url (r'^create/confirm/(?P<auth>[^/]+)/$' , views .confirm_account ),
1717 url (r'^login/$' , views .login ),
18- url (r'^logout/$' , logout ),
18+ url (r'^logout/$' , LogoutView . as_view (), name = "django.contrib.auth.views. logout" ),
1919 url (r'^password/$' , views .change_password ),
2020 url (r'^profile/$' , views .profile ),
2121 url (r'^reset/$' , views .password_reset ),
You can’t perform that action at this time.
0 commit comments