Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…al 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
  • Loading branch information...
commit 514c0b5eb48ee23f656ab433ff35f01741d2c3a0 1 parent 4306501
@freakboy3742 freakboy3742 authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  django/contrib/messages/tests/base.py
View
3  django/contrib/messages/tests/base.py
@@ -58,6 +58,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 = ()
self.save_warnings_state()
warnings.filterwarnings('ignore', category=DeprecationWarning,
module='django.contrib.auth.models')
@@ -71,6 +73,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
self.restore_warnings_state()
def restore_setting(self, setting):
Please sign in to comment.
Something went wrong with that request. Please try again.