Permalink
Browse files

[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
  • Loading branch information...
1 parent bb46b44 commit 46b1fdaba00a208914c5aa7790f02ed577e57f7c @freakboy3742 freakboy3742 committed Feb 4, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 django/contrib/messages/tests/base.py
@@ -49,6 +49,8 @@ def setUp(self):
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 @@ def tearDown(self):
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:

0 comments on commit 46b1fda

Please sign in to comment.