[1.2.X] Fixed #15016 -- Ensured that the messages tests are isolated from local template directories. Thanks to Gabriel Hurley for the report and patch.
Backport of r15407 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15408 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bb46b44ec9
commit
46b1fdaba0
|
@ -49,6 +49,8 @@ class BaseTest(TestCase):
|
|||
self._message_storage = settings.MESSAGE_STORAGE
|
||||
settings.MESSAGE_STORAGE = '%s.%s' % (self.storage_class.__module__,
|
||||
self.storage_class.__name__)
|
||||
self.old_TEMPLATE_DIRS = settings.TEMPLATE_DIRS
|
||||
settings.TEMPLATE_DIRS = ()
|
||||
|
||||
def tearDown(self):
|
||||
for setting in self.restore_settings:
|
||||
|
@ -59,6 +61,7 @@ class BaseTest(TestCase):
|
|||
self._template_context_processors
|
||||
settings.INSTALLED_APPS = self._installed_apps
|
||||
settings.MESSAGE_STORAGE = self._message_storage
|
||||
settings.TEMPLATE_DIRS = self.old_TEMPLATE_DIRS
|
||||
|
||||
def restore_setting(self, setting):
|
||||
if setting in self._remembered_settings:
|
||||
|
|
Loading…
Reference in New Issue