Kaydet (Commit) 514c0b5e authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

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

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
üst 4306501d
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment