﻿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
30084	Setting DATABASES['default']['TEST']['engine'] to SQLite does not cause Django to use an in-memory database as expected	mrts	nobody	"== Preconditions

Given the following settings:

{{{
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'database',
        ...
        'TEST': {
            'ENGINE': 'django.db.backends.sqlite3',
        }
    }
}
}}}


== Actual

When I run `./manage.py test` in a restricted environment, then I get the following error:

{{{
$ ./manage.py test
Creating test database for alias 'default'...
Got an error creating the test database: permission denied to create database

Type 'yes' if you would like to try deleting the test database 'test_database', or 'no' to cancel: yes
Destroying old test database 'default'...
Got an error recreating the test database: database ""test_database"" does not exist
}}}

== Expected

The documentation says:

> The default test database names are created by prepending `test_` to the value of each NAME in DATABASES. When using SQLite, the tests will use an in-memory database by default (i.e., the database will be created in memory, bypassing the filesystem entirely!). 


Thus, my expectation was that setting `DATABASES['default']['TEST']['engine']` to SQLite will use an in-memory database."	Bug	closed	Testing framework	2.1	Normal	invalid			Unreviewed	0	0	0	0	0	0
