Loading django/db/utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -210,7 +210,7 @@ class ConnectionHandler(object): "Connection '%s' has mismatched TEST and TEST_* " "database settings." % alias) else: test_settings = old_test_settings test_settings.update(old_test_settings) for key, _ in six.iteritems(old_test_settings): warnings.warn("In Django 1.9 the %s connection setting will be moved " "to a %s entry in the TEST setting" % Loading tests/backends/tests.py +9 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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': {}} Loading Loading
django/db/utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -210,7 +210,7 @@ class ConnectionHandler(object): "Connection '%s' has mismatched TEST and TEST_* " "database settings." % alias) else: test_settings = old_test_settings test_settings.update(old_test_settings) for key, _ in six.iteritems(old_test_settings): warnings.warn("In Django 1.9 the %s connection setting will be moved " "to a %s entry in the TEST setting" % Loading
tests/backends/tests.py +9 −2 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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': {}} Loading