1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

[1.5.x] Fixed #18575 -- Empty DATABASES should default to dummy backend

Thanks delormemarco@gmail.com for the report.

Backport of f1cc2be0c from master.
This commit is contained in:
Claude Paroz
2012-10-28 23:02:41 +01:00
parent 95f3f0cbbe
commit b4627bcabe
4 changed files with 22 additions and 8 deletions

View File

@@ -23,6 +23,17 @@ from django.utils import unittest
from . import models
class DummyBackendTest(TestCase):
def test_no_databases(self):
"""
Test that empty DATABASES setting default to the dummy backend.
"""
DATABASES = {}
conns = ConnectionHandler(DATABASES)
self.assertEqual(conns[DEFAULT_DB_ALIAS].settings_dict['ENGINE'],
'django.db.backends.dummy')
class OracleChecks(unittest.TestCase):
@unittest.skipUnless(connection.vendor == 'oracle',