Ticket #14252: django-flatpages-tests.diff

File django-flatpages-tests.diff, 2.1 KB (added by Paul McLanahan, 14 years ago)

Proposed fix

  • django/contrib/flatpages/tests/csrf.py

     
    2323                'templates'
    2424            ),
    2525        )
     26        self.old_LOGIN_URL = settings.LOGIN_URL
     27        settings.LOGIN_URL = '/accounts/login/'
    2628
    2729    def tearDown(self):
    2830        settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
    2931        settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
     32        settings.LOGIN_URL = self.old_LOGIN_URL
    3033
    3134    def test_view_flatpage(self):
    3235        "A flatpage can be served through a view, even when the middleware is in use"
  • django/contrib/flatpages/tests/middleware.py

     
    1919                'templates'
    2020            ),
    2121        )
     22        self.old_LOGIN_URL = settings.LOGIN_URL
     23        settings.LOGIN_URL = '/accounts/login/'
    2224
    2325    def tearDown(self):
    2426        settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
    2527        settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
     28        settings.LOGIN_URL = self.old_LOGIN_URL
    2629
    2730    def test_view_flatpage(self):
    2831        "A flatpage can be served through a view, even when the middleware is in use"
  • django/contrib/flatpages/tests/views.py

     
    2020                'templates'
    2121            ),
    2222        )
     23        self.old_LOGIN_URL = settings.LOGIN_URL
     24        settings.LOGIN_URL = '/accounts/login/'
    2325
    2426    def tearDown(self):
    2527        settings.MIDDLEWARE_CLASSES = self.old_MIDDLEWARE_CLASSES
    2628        settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
     29        settings.LOGIN_URL = self.old_LOGIN_URL
    2730
    2831    def test_view_flatpage(self):
    2932        "A flatpage can be served through a view"
Back to Top