Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606885025-practice
Commits
811737a2
Commit
811737a2
authored
Nov 22, 2019
by
Rani Lasma Uli
Browse files
add logout feature and passed the test
parent
85b16b6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
accounts/urls.py
View file @
811737a2
from
django.contrib.auth.views
import
LogoutView
from
django.contrib.auth.views
import
logout
from
django.conf.urls
import
url
from
accounts
import
views
urlpatterns
=
[
url
(
r
'^send_email$'
,
views
.
send_login_email
,
name
=
'send_login_email'
),
url
(
r
'^send_login_email$'
,
views
.
send_login_email
,
name
=
'send_login_email'
),
url
(
r
'^login$'
,
views
.
login
,
name
=
'login'
),
url
(
r
'^logout$'
,
l
ogout
,
{
'
next_page
'
:
'/'
}
,
name
=
'logout'
),
url
(
r
'^logout$'
,
L
ogout
View
.
as_view
(
next_page
=
'/'
)
,
name
=
'logout'
),
]
\ No newline at end of file
functional_tests/base.py
View file @
811737a2
...
...
@@ -23,13 +23,13 @@ class FunctionalTest(StaticLiveServerTestCase):
def
createBrowserInstance
(
self
):
try
:
#
self.browser = webdriver.Chrome(options=self.options)
self
.
browser
=
webdriver
.
Firefox
()
self
.
browser
=
webdriver
.
Chrome
(
options
=
self
.
options
)
#
self.browser = webdriver.Firefox()
except
WebDriverException
:
# linux
#
self.browser = webdriver.Chrome('./chromedriver',
#
options=self.options)
self
.
browser
=
webdriver
.
Firefox
(
'~/usr/bin/geckodriver'
)
self
.
browser
=
webdriver
.
Chrome
(
'./chromedriver'
,
options
=
self
.
options
)
#
self.browser = webdriver.Firefox('~/usr/bin/geckodriver')
self
.
browser
.
implicitly_wait
(
3
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment