summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/test/simple.py10
-rw-r--r--docs/topics/testing.txt2
2 files changed, 6 insertions, 6 deletions
diff --git a/django/test/simple.py b/django/test/simple.py
index 3c94ebc64e..1b26ebbe74 100644
--- a/django/test/simple.py
+++ b/django/test/simple.py
@@ -273,9 +273,9 @@ class DjangoTestSuiteRunner(object):
# the alias.
mirrored_aliases[alias] = connection.settings_dict['TEST_MIRROR']
else:
- # Store the (engine, name) pair. If we have two aliases
- # with the same pair, we only need to create the test database
- # once.
+ # Store a tuple with DB parameters that uniquely identify it.
+ # If we have two aliases with the same values for that tuple,
+ # we only need to create the test database once.
test_databases.setdefault((
connection.settings_dict['HOST'],
connection.settings_dict['PORT'],
@@ -286,8 +286,8 @@ class DjangoTestSuiteRunner(object):
if 'TEST_DEPENDENCIES' in connection.settings_dict:
dependencies[alias] = connection.settings_dict['TEST_DEPENDENCIES']
else:
- if alias != 'default':
- dependencies[alias] = connection.settings_dict.get('TEST_DEPENDENCIES', ['default'])
+ if alias != DEFAULT_DB_ALIAS:
+ dependencies[alias] = connection.settings_dict.get('TEST_DEPENDENCIES', [DEFAULT_DB_ALIAS])
# Second pass -- actually create the databases.
old_names = []
diff --git a/docs/topics/testing.txt b/docs/topics/testing.txt
index d1fda1d6a6..17a5db5481 100644
--- a/docs/topics/testing.txt
+++ b/docs/topics/testing.txt
@@ -493,7 +493,7 @@ can specify the dependencies that exist using the
}
Under this configuration, the ``diamonds`` database will be created first,
-as it is the only database alias without dependencies. The ``default``` and
+as it is the only database alias without dependencies. The ``default`` and
``clubs`` alias will be created next (although the order of creation of this
pair is not guaranteed); then ``hearts``; and finally ``spades``.