Fakultas Ilmu Komputer UI

Commit 811737a2 authored by Rani Lasma Uli's avatar Rani Lasma Uli
Browse files

add logout feature and passed the test

parent 85b16b6f
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$', logout, {'next_page': '/'}, name='logout'),
url(r'^logout$', LogoutView.as_view(next_page='/'), name='logout'),
]
\ No newline at end of file
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment