

def setUp(self):
    self.old_MIDDLEWARE_CLASSES = settings.MIDDLEWARE_CLASSES
    flatpage_middleware_class = 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware'
    if (flatpage_middleware_class not in settings.MIDDLEWARE_CLASSES):
        settings.MIDDLEWARE_CLASSES += (flatpage_middleware_class,)
    self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
    settings.TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates'),)
    self.old_LOGIN_URL = settings.LOGIN_URL
    settings.LOGIN_URL = '/accounts/login/'

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/flatpages/tests/middleware.py FlatpageMiddlewareTests.setUp/original