summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-11-09 09:41:03 +0100
committerClaude Paroz <claude@2xlibre.net>2013-11-09 09:42:17 +0100
commite953c78eeb81ee69dccd356145563fd6f9e4c7b6 (patch)
treec108c4b9afddc91a36eeb0516cde7fa4443ae985 /docs
parent1830f50493cae042dac11957af986b0fd84f889f (diff)
Fixed #16969 -- Don't connect to named database when possible
Thanks Andreas Pelme for the report and initial patch, and Aymeric Augustin, Shai Berger and Tim Graham for the reviews.
Diffstat (limited to 'docs')
-rw-r--r--docs/internals/contributing/writing-code/unit-tests.txt18
1 files changed, 11 insertions, 7 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt
index 99969e36d6..e83d0bef17 100644
--- a/docs/internals/contributing/writing-code/unit-tests.txt
+++ b/docs/internals/contributing/writing-code/unit-tests.txt
@@ -76,17 +76,21 @@ If you're using a backend that isn't SQLite, you will need to provide other
details for each database:
* The :setting:`USER` option needs to specify an existing user account
- for the database.
+ for the database. That user needs permission to execute ``CREATE DATABASE``
+ so that the test database can be created.
* The :setting:`PASSWORD` option needs to provide the password for
the :setting:`USER` that has been specified.
-* The :setting:`NAME` option must be the name of an existing database to
- which the given user has permission to connect. The unit tests will not
- touch this database; the test runner creates a new database whose name
- is :setting:`NAME` prefixed with ``test_``, and this test database is
- deleted when the tests are finished. This means your user account needs
- permission to execute ``CREATE DATABASE``.
+Test databases get their names by prepending ``test_`` to the value of the
+:setting:`NAME` settings for the databases defined in :setting:`DATABASES`.
+These test databases are deleted when the tests are finished.
+
+.. versionchanged:: 1.7
+
+ Before Django 1.7, the :setting:`NAME` setting was mandatory and had to
+ be the name of an existing database to which the given user had permission
+ to connect.
You will also need to ensure that your database uses UTF-8 as the default
character set. If your database server doesn't use UTF-8 as a default charset,