Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #14252 - django.contrib.flatpages unit tests assume default val…

…ue for settings.LOGIN_URL

Thanks to pmclanahan for report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 86031bf59d8dfb0972c064bb5e20da162e510c20 1 parent 6fb4f6e
@spookylukey spookylukey authored
View
3  django/contrib/flatpages/tests/csrf.py
@@ -23,10 +23,13 @@ def setUp(self):
'templates'
),
)
+ self.old_LOGIN_URL = settings.LOGIN_URL
+ settings.LOGIN_URL = '/accounts/login/'
def tearDown(self):
settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
+ settings.LOGIN_URL = self.old_LOGIN_URL
def test_view_flatpage(self):
"A flatpage can be served through a view, even when the middleware is in use"
View
3  django/contrib/flatpages/tests/middleware.py
@@ -19,10 +19,13 @@ def setUp(self):
'templates'
),
)
+ self.old_LOGIN_URL = settings.LOGIN_URL
+ settings.LOGIN_URL = '/accounts/login/'
def tearDown(self):
settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
+ settings.LOGIN_URL = self.old_LOGIN_URL
def test_view_flatpage(self):
"A flatpage can be served through a view, even when the middleware is in use"
View
3  django/contrib/flatpages/tests/views.py
@@ -20,10 +20,13 @@ def setUp(self):
'templates'
),
)
+ self.old_LOGIN_URL = settings.LOGIN_URL
+ settings.LOGIN_URL = '/accounts/login/'
def tearDown(self):
settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
+ settings.LOGIN_URL = self.old_LOGIN_URL
def test_view_flatpage(self):
"A flatpage can be served through a view"
Please sign in to comment.
Something went wrong with that request. Please try again.