summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-06-12 09:28:36 -0400
committerTim Graham <timograham@gmail.com>2014-06-12 09:28:36 -0400
commita2cd0e12c9410a7b8a30064e3967c617f4de2de5 (patch)
tree5078ef51ab6619a5f621acbd4cde1b0b19946249 /tests
parent1c58cabad7f5b792e9cfd8f00feffd8212fdfbb1 (diff)
Silenced deprecation warnings for refs #22811 and fixed build.
Diffstat (limited to 'tests')
-rw-r--r--tests/backends/tests.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/backends/tests.py b/tests/backends/tests.py
index 83ed099a9b..9742358a59 100644
--- a/tests/backends/tests.py
+++ b/tests/backends/tests.py
@@ -26,7 +26,7 @@ from django.db.models.sql.constants import CURSOR
from django.db.utils import ConnectionHandler
from django.test import (TestCase, TransactionTestCase, override_settings,
skipUnlessDBFeature, skipIfDBFeature)
-from django.test.utils import str_prefix
+from django.test.utils import str_prefix, IgnoreAllDeprecationWarningsMixin
from django.utils import six
from django.utils.six.moves import xrange
@@ -1080,12 +1080,19 @@ class BackendUtilTests(TestCase):
'0')
-class DBTestSettingsRenamedTests(TestCase):
+class DBTestSettingsRenamedTests(IgnoreAllDeprecationWarningsMixin, TestCase):
mismatch_msg = ("Connection 'test-deprecation' has mismatched TEST "
"and TEST_* database settings.")
+ @classmethod
+ def setUpClass(cls):
+ # Silence "UserWarning: Overriding setting DATABASES can lead to
+ # unexpected behavior."
+ cls.warning_classes.append(UserWarning)
+
def setUp(self):
+ super(DBTestSettingsRenamedTests, self).setUp()
self.handler = ConnectionHandler()
self.db_settings = {'default': {}}