diff options
| author | Tim Graham <timograham@gmail.com> | 2013-07-13 18:09:24 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-07-13 18:09:24 -0400 |
| commit | 8904e9fb98eaa94fd38e28706e2fe6786d3adc70 (patch) | |
| tree | 34d04fd8d62e02e0858fb6c9cd0a49abe646ceac /django/test | |
| parent | 61c8c1b6dcd267a7d4777ff3b0a78eaedb9b95d3 (diff) | |
[1.5.x] Fixed #20681 -- Prevented teardown_databases from attempting to tear down aliases
Thanks simonpercivall.
Backport of d9c580306c from master
Diffstat (limited to 'django/test')
| -rw-r--r-- | django/test/simple.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/test/simple.py b/django/test/simple.py index e062f5e1e8..24471ca76e 100644 --- a/django/test/simple.py +++ b/django/test/simple.py @@ -310,12 +310,14 @@ class DjangoTestSuiteRunner(object): for alias in aliases: connection = connections[alias] - old_names.append((connection, db_name, True)) if test_db_name is None: test_db_name = connection.creation.create_test_db( self.verbosity, autoclobber=not self.interactive) + destroy = True else: connection.settings_dict['NAME'] = test_db_name + destroy = False + old_names.append((connection, db_name, destroy)) for alias, mirror_alias in mirrored_aliases.items(): mirrors.append((alias, connections[alias].settings_dict['NAME'])) |
