mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +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:
parent
95f3f0cbbe
commit
b4627bcabe
4 changed files with 22 additions and 8 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue