mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Moved ensure_defaults() and prepare_test_settings() logic to ConnectionHandler.configure_settings().
This commit is contained in:
committed by
Mariusz Felisiak
parent
58ad9a99a7
commit
13378ad952
@@ -50,26 +50,6 @@ class ConnectionHandlerTests(SimpleTestCase):
|
||||
with self.assertRaisesMessage(ConnectionDoesNotExist, msg):
|
||||
conns["nonexistent"]
|
||||
|
||||
def test_ensure_defaults_nonexistent_alias(self):
|
||||
msg = "The connection 'nonexistent' doesn't exist."
|
||||
conns = ConnectionHandler(
|
||||
{
|
||||
DEFAULT_DB_ALIAS: {"ENGINE": "django.db.backends.dummy"},
|
||||
}
|
||||
)
|
||||
with self.assertRaisesMessage(ConnectionDoesNotExist, msg):
|
||||
conns.ensure_defaults("nonexistent")
|
||||
|
||||
def test_prepare_test_settings_nonexistent_alias(self):
|
||||
msg = "The connection 'nonexistent' doesn't exist."
|
||||
conns = ConnectionHandler(
|
||||
{
|
||||
DEFAULT_DB_ALIAS: {"ENGINE": "django.db.backends.dummy"},
|
||||
}
|
||||
)
|
||||
with self.assertRaisesMessage(ConnectionDoesNotExist, msg):
|
||||
conns.prepare_test_settings("nonexistent")
|
||||
|
||||
|
||||
class DatabaseErrorWrapperTests(TestCase):
|
||||
@unittest.skipUnless(connection.vendor == "postgresql", "PostgreSQL test")
|
||||
|
||||
Reference in New Issue
Block a user