mirror of
https://github.com/django/django.git
synced 2025-12-04 00:55:36 +00:00
Silenced deprecation warnings for refs #22811 and fixed build.
This commit is contained in:
parent
1c58cabad7
commit
a2cd0e12c9
2 changed files with 10 additions and 3 deletions
|
|
@ -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': {}}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue