[1.2.X] Fixed #14252 - django.contrib.flatpages unit tests assume default value for settings.LOGIN_URL
Thanks to pmclanahan for report and patch. Backport of [13851] from trunk git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13853 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
759625cd90
commit
238eea44eb
|
@ -22,10 +22,13 @@ class FlatpageCSRFTests(TestCase):
|
|||
'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"
|
||||
|
|
|
@ -18,10 +18,13 @@ class FlatpageMiddlewareTests(TestCase):
|
|||
'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"
|
||||
|
|
|
@ -18,10 +18,13 @@ class FlatpageViewTests(TestCase):
|
|||
'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"
|
||||
|
|
Loading…
Reference in New Issue