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 16329,"Django doesn't initialize two databases with the same name, port and host",Cesar Canassa,nobody,"When you have two or more databases with the same name, port and host the test suite will only initialize the first one. '''Steps to reproduce:''' Create a settings file with the following database configuration and run the test suite: {{{ DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, 'log': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } } }}} When the test suit runs Django will only initialize the 'default' database. {{{ Creating test database for alias 'default'... Ran 4 tests in 4.030s }}} '''Workaround''' A temporary workaround for this issues is changing the second database NAME or put anything in the HOST or PORT. That would be enough to mark the two databases as distinct from the perspective of the test setup mechanism. After changing it, this is the test suite output: {{{ Creating test database for alias 'default'... Creating test database for alias 'log'... Ran 4 tests in 0.076s }}} Note that the test time has decreased when both databases are initialized. This is due to Django failing to initialize the 'log' database on the first run which makes the test suite run without transitions enabled. For more information, see the topic in the mailing list: http://groups.google.com/group/django-users/browse_thread/thread/6542c80f1b0e482a",Bug,closed,Testing framework,1.3,Normal,fixed,,aron@…,Accepted,1,0,0,0,0,0