Commit 514c0b5e authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #15016 -- Ensured that the messages tests are isolated from local...

Fixed #15016 -- Ensured that the messages tests are isolated from local template directories. Thanks to Gabriel Hurley for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 4306501d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -58,6 +58,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 = ()
        self.save_warnings_state()
        warnings.filterwarnings('ignore', category=DeprecationWarning,
                                module='django.contrib.auth.models')
@@ -71,6 +73,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
        self.restore_warnings_state()

    def restore_setting(self, setting):