Changed the 2.1 removed django.contrib.auth.views.logout to LogoutView.
- Legacy-Id: 18052
This commit is contained in:
parent
dc7581fef4
commit
7c7c5da39f
|
@ -24,7 +24,6 @@ from pyquery import PyQuery
|
|||
from unittest import skipIf
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
import django.contrib.auth.views
|
||||
from django.urls import reverse as urlreverse
|
||||
from django.contrib.auth.models import User
|
||||
from django.conf import settings
|
||||
|
@ -91,7 +90,7 @@ class IetfAuthTests(TestCase):
|
|||
self.assertEqual(urlsplit(r["Location"])[2], urlreverse(ietf.ietfauth.views.profile))
|
||||
|
||||
# try logging out
|
||||
r = self.client.get(urlreverse(django.contrib.auth.views.logout))
|
||||
r = self.client.get(urlreverse('django.contrib.auth.views.logout'))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
r = self.client.get(urlreverse(ietf.ietfauth.views.profile))
|
||||
|
@ -198,7 +197,7 @@ class IetfAuthTests(TestCase):
|
|||
self.assertContains(r, "Whitelist entry creation successful")
|
||||
|
||||
# log out
|
||||
r = self.client.get(urlreverse(django.contrib.auth.views.logout))
|
||||
r = self.client.get(urlreverse('django.contrib.auth.views.logout'))
|
||||
self.assertEqual(r.status_code, 200)
|
||||
|
||||
# register and verify whitelisted email
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright The IETF Trust 2007-2019, All Rights Reserved
|
||||
# Copyright The IETF Trust 2007, 2009, All Rights Reserved
|
||||
|
||||
from django.contrib.auth.views import logout # type: ignore
|
||||
from django.contrib.auth.views import LogoutView # type: ignore
|
||||
|
||||
from ietf.ietfauth import views
|
||||
from ietf.utils.urls import url
|
||||
|
@ -15,7 +15,7 @@ urlpatterns = [
|
|||
url(r'^create/$', views.create_account),
|
||||
url(r'^create/confirm/(?P<auth>[^/]+)/$', views.confirm_account),
|
||||
url(r'^login/$', views.login),
|
||||
url(r'^logout/$', logout),
|
||||
url(r'^logout/$', LogoutView.as_view(), name="django.contrib.auth.views.logout"),
|
||||
url(r'^password/$', views.change_password),
|
||||
url(r'^profile/$', views.profile),
|
||||
url(r'^reset/$', views.password_reset),
|
||||
|
|
Loading…
Reference in a new issue