From 39a79dc0cdec6de6820f10bd6a6919eb001a3ebb Mon Sep 17 00:00:00 2001 From: Christian Zambrano Date: Sun, 31 Mar 2013 00:08:28 +0000 Subject: [PATCH] Fixed #20166 -- Updated DB dependency documentation and fixed example Updated the documentation for how to control the order in which tests databases are created by making it clear that the reason the default is always created first is because by default all databases are made dependent on the default one. Also fixed the example to be correct as before this change it was actually raising the ImproperlyConfigured exception --- docs/topics/testing/advanced.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/topics/testing/advanced.txt b/docs/topics/testing/advanced.txt index 26dc8ee1aefea..b0e2b5107bcfd 100644 --- a/docs/topics/testing/advanced.txt +++ b/docs/topics/testing/advanced.txt @@ -113,7 +113,8 @@ two databases. Controlling creation order for test databases --------------------------------------------- -By default, Django will always create the ``default`` database first. +By default, Django will assume all databases depend on the ``default`` +database and therefore always create the ``default`` database first. However, no guarantees are made on the creation order of any other databases in your test setup. @@ -129,6 +130,7 @@ can specify the dependencies that exist using the }, 'diamonds': { # ... db settings + 'TEST_DEPENDENCIES': [] }, 'clubs': { # ... db settings