Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

0 notes on commit 86031bf

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