﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
24394	Running tests fails when DATABASES['default'] = {}	Thomas Recouvreux	andrei kulakov	"On Django 1.7.x the management command `test` fails when `DATABASES['default'] = {}` with `AttributeError: 'DatabaseWrapper' object has no attribute 'Database'`.
This failure is also present on 1.7.3 and 1.7.4 version of Django.

To reproduce the problem:

1. Create a new project
2. Edit the settings.py this way:

{{{
DATABASES = {
    'default': {},
    'mysite': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db_mysite.sqlite3'),
    }
}
}}}


3. Add a dummy test to yout project, for example:

{{{
from django.test import TestCase


class MyTestCase(TestCase):
    def test_pouet(self):
        pass
}}}

4. Run python manage.py test


Problem:

It seems Django instantiate a dummy connector for `default` and then calls not implemented methods on this connector.

I am attaching the output log of the command.
Here is a sample project to reproduce the behaviour: ​​https://github.com/trecouvr/test_dj_migrate_174.
"	Bug	closed	Testing framework	1.7	Normal	fixed	test		Accepted	1	0	0	0	0	0
