summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2015-09-06 09:20:35 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2015-09-06 09:28:16 +0200
commite8bfc1c74767ba902846ed0736327ce400112f3c (patch)
tree93f2ca949c3a36385169db361acca307d14dd5d6
parent79c3f226dd6e6a4dd27173d08b024bf756ea6e39 (diff)
Stopped returning mirrors from setup_databases.
The return value of setup_databases is only used as an argument for teardown_databases which doesn't need mirrors.
-rw-r--r--django/test/runner.py7
-rw-r--r--docs/releases/1.9.txt7
2 files changed, 9 insertions, 5 deletions
diff --git a/django/test/runner.py b/django/test/runner.py
index afcc85783c..446c3b1ab2 100644
--- a/django/test/runner.py
+++ b/django/test/runner.py
@@ -183,8 +183,7 @@ class DiscoverRunner(object):
"""
Destroys all the non-mirror databases.
"""
- old_names, mirrors = old_config
- for connection, old_name, destroy in old_names:
+ for connection, old_name, destroy in old_config:
if destroy:
connection.creation.destroy_test_db(old_name, self.verbosity, self.keepdb)
@@ -374,7 +373,6 @@ def setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, **kwa
test_databases, mirrored_aliases = get_unique_databases_and_mirrors()
old_names = []
- mirrors = []
for signature, (db_name, aliases) in test_databases.items():
first_alias = None
@@ -396,7 +394,6 @@ def setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, **kwa
connections[first_alias].settings_dict)
for alias, mirror_alias in mirrored_aliases.items():
- mirrors.append((alias, connections[alias].settings_dict['NAME']))
connections[alias].creation.set_as_test_mirror(
connections[mirror_alias].settings_dict)
@@ -404,4 +401,4 @@ def setup_databases(verbosity, interactive, keepdb=False, debug_sql=False, **kwa
for alias in connections:
connections[alias].force_debug_cursor = True
- return old_names, mirrors
+ return old_names
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index cf7909057b..a0219bd370 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -995,6 +995,7 @@ Miscellaneous
* Private function ``django.utils.functional.total_ordering()`` has been
removed. It contained a workaround for a ``functools.total_ordering()`` bug
in Python versions older than 2.7.3.
+
* XML serialization (either through :djadmin:`dumpdata` or the syndication
framework) used to output any characters it received. Now if the content to
be serialized contains any control characters not allowed in the XML 1.0
@@ -1023,6 +1024,12 @@ Miscellaneous
as it's unused by the application. If your project or a third-party app makes
use of it, :ref:`create a custom ModelAdmin <flatpages-admin>` to add it back.
+* The return value of
+ :meth:`~django.test.runner.DiscoverRunner.setup_databases` and the first
+ argument of :meth:`~django.test.runner.DiscoverRunner.teardown_databases`
+ changed. They used to be ``(old_names, mirrors)`` tuples. Now they're just
+ the first item, ``old_names``.
+
.. _deprecated-features-1.9:
Features deprecated in 1.9