diff --git a/django/db/backends/dummy/base.py b/django/db/backends/dummy/base.py index e3ab4564ea6..b1385aaeb8c 100644 --- a/django/db/backends/dummy/base.py +++ b/django/db/backends/dummy/base.py @@ -41,13 +41,16 @@ class DatabaseWrapper(object): _commit = complain _rollback = ignore - def __init__(self, *args, **kwargs): + def __init__(self, settings_dict, alias, *args, **kwargs): self.features = BaseDatabaseFeatures() self.ops = DatabaseOperations() self.client = DatabaseClient(self) self.creation = BaseDatabaseCreation(self) self.introspection = DatabaseIntrospection(self) - self.validation = BaseDatabaseValidation() + self.validation = BaseDatabaseValidation(self) + + self.settings_dict = settings_dict + self.alias = alias def close(self): pass diff --git a/django/db/utils.py b/django/db/utils.py index 8c0b6771566..0be40daeca6 100644 --- a/django/db/utils.py +++ b/django/db/utils.py @@ -55,7 +55,9 @@ class ConnectionHandler(object): conn = self.databases[alias] except KeyError: raise ConnectionDoesNotExist("The connection %s doesn't exist" % alias) - conn.setdefault('ENGINE', 'dummy') + conn.setdefault('ENGINE', 'django.db.backends.dummy') + if conn['ENGINE'] == 'django.db.backends.': + conn['ENGINE'] = 'django.db.backends.dummy' conn.setdefault('OPTIONS', {}) conn.setdefault('TEST_CHARSET', None) conn.setdefault('TEST_COLLATION', None)