﻿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
27160	Document that running the Django test suite requires creating the databases and, on PostgresQL, a superuser	Sergei Zh	nobody	"I'm talking about [https://docs.djangoproject.com/en/1.9/internals/contributing/writing-code/unit-tests/#using-another-settings-module Using another settings module] subsection.

Django system tests freezes on my machine with default settings (sqlite), so I decided to try `postgresql` as backend.
I created user with CREATEDB permissions and replaced DB settings with 

{{{
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'test',
        'PASSWORD': 'test',
        'HOST': 'localhost',
        'NAME': 'test_d'
    },
    'other': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'test',
        'PASSWORD': 'test',
        'HOST': 'localhost',
        'NAME': 'test_o',
    }
}
}}}

After that I got an error:

{{{
django.db.utils.OperationalError: FATAL:  database ""test_d"" does not exist
}}}

When docs says:
{{{
Test databases get their names by prepending test_ to the value of the NAME settings for the databases defined in DATABASES. These test databases are deleted when the tests are finished.
}}}
I'm waiting that `runtests` will create `test_test_o` and `test_test_d` for me and I no need in `test_d` and `test_o` databases at all.

Maybe I'm doing something wrong or docs should be improved?

P.S. After I created dbs manually, I got:

{{{
psycopg2.ProgrammingError: permission denied to create extension ""hstore"".
HINT:  Must be superuser to create this extension.
}}}

Mb it's engine specific error, I'm not sure.

"	Cleanup/optimization	closed	Documentation	1.9	Normal	worksforme			Accepted	0	0	0	0	0	0
