summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2014-06-23 20:25:09 -0700
committerAndrew Godwin <andrew@aeracode.org>2014-06-23 20:25:52 -0700
commit0dd737a719cfbd3bc11ff6f2b90161883fcebea0 (patch)
treed0acbbaabf7e928f556e0125a7fad5b3c38f234d /django/db
parent68b89f4d13b69771b232c1fcb0fb598000b6eb98 (diff)
[1.7.x] Fixed #22487: Don't flush out data from before normal TestCases
Diffstat (limited to 'django/db')
-rw-r--r--django/db/backends/creation.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/django/db/backends/creation.py b/django/db/backends/creation.py
index 91576c516b..752eac75cd 100644
--- a/django/db/backends/creation.py
+++ b/django/db/backends/creation.py
@@ -371,6 +371,7 @@ class BaseDatabaseCreation(object):
interactive=False,
database=self.connection.alias,
test_database=True,
+ test_flush=True,
)
# We then serialize the current state of the database into a string
@@ -380,14 +381,6 @@ class BaseDatabaseCreation(object):
if serialize:
self.connection._test_serialized_contents = self.serialize_db_to_string()
- # Finally, we flush the database to clean
- call_command(
- 'flush',
- verbosity=max(verbosity - 1, 0),
- interactive=False,
- database=self.connection.alias
- )
-
call_command('createcachetable', database=self.connection.alias)
# Ensure a connection for the side effect of initializing the test database.