Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Fixed #14252 - django.contrib.flatpages unit tests assume def…

…ault 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
  • Loading branch information...
commit 238eea44ebcd6bf897bb389154e6f1c18859acc0 1 parent 759625c
Luke Plant authored September 13, 2010
3  django/contrib/flatpages/tests/csrf.py
@@ -22,10 +22,13 @@ def setUp(self):
22 22
                 'templates'
23 23
             ),
24 24
         )
  25
+        self.old_LOGIN_URL = settings.LOGIN_URL
  26
+        settings.LOGIN_URL = '/accounts/login/'
25 27
 
26 28
     def tearDown(self):
27 29
         settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
28 30
         settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
  31
+        settings.LOGIN_URL = self.old_LOGIN_URL
29 32
 
30 33
     def test_view_flatpage(self):
31 34
         "A flatpage can be served through a view, even when the middleware is in use"
3  django/contrib/flatpages/tests/middleware.py
@@ -18,10 +18,13 @@ def setUp(self):
18 18
                 'templates'
19 19
             ),
20 20
         )
  21
+        self.old_LOGIN_URL = settings.LOGIN_URL
  22
+        settings.LOGIN_URL = '/accounts/login/'
21 23
 
22 24
     def tearDown(self):
23 25
         settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
24 26
         settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
  27
+        settings.LOGIN_URL = self.old_LOGIN_URL
25 28
 
26 29
     def test_view_flatpage(self):
27 30
         "A flatpage can be served through a view, even when the middleware is in use"
3  django/contrib/flatpages/tests/views.py
@@ -18,10 +18,13 @@ def setUp(self):
18 18
                 'templates'
19 19
             ),
20 20
         )
  21
+        self.old_LOGIN_URL = settings.LOGIN_URL
  22
+        settings.LOGIN_URL = '/accounts/login/'
21 23
 
22 24
     def tearDown(self):
23 25
         settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
24 26
         settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
  27
+        settings.LOGIN_URL = self.old_LOGIN_URL
25 28
 
26 29
     def test_view_flatpage(self):
27 30
         "A flatpage can be served through a view"

0 notes on commit 238eea4

Please sign in to comment.
Something went wrong with that request. Please try again.