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 ` 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