示例#1
0
    def test_login_url_with_auth_user(self):
        request = self.factory.get(settings.LOGIN_URL)
        request.user = self.user
        response = AccountAuthView.as_view()(request)

        self.assertEqual(response.status_code, 302)
示例#2
0
    def test_login_url_with_auth_user(self):
        request = self.factory.get(settings.LOGIN_URL)
        request.user = self.user
        response = AccountAuthView.as_view()(request)

        self.assertEqual(response.status_code, 302)
示例#3
0
from django.conf.urls import patterns, url

from webaccount.views import AccountAuthView, AccountEditView, logout_view

urlpatterns = patterns(
    '',
    url(r'^login/$', AccountAuthView.as_view(), name='login_registration'),
    url(r'^logout/$', logout_view, name='logout'),
    url(r'^profile/$', AccountEditView.as_view(), name='profile'),
)