Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.2.X] Added a modification missed in r15241 (backport of r15239 to …

…this branch.)

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 80264702d0501a9817d6b11eebd5912c27824348 1 parent 715c00d
@ramiro ramiro authored
Showing with 15 additions and 1 deletion.
  1. +15 −1 django/db/backends/
16 django/db/backends/
@@ -350,7 +350,21 @@ def create_test_db(self, verbosity=1, autoclobber=False):
can_rollback = self._rollback_works()
self.connection.settings_dict["SUPPORTS_TRANSACTIONS"] = can_rollback
- call_command('syncdb', verbosity=verbosity, interactive=False, database=self.connection.alias)
+ call_command('syncdb',
+ verbosity=verbosity,
+ interactive=False,
+ database=self.connection.alias,
+ load_initial_data=False)
+ # We need to then do a flush to ensure that any data installed by
+ # custom SQL has been removed. The only test data should come from
+ # test fixtures, or autogenerated from post_syncdb triggers.
+ # This has the side effect of loading initial data (which was
+ # intentionally skipped in the syncdb).
+ call_command('flush',
+ verbosity=verbosity,
+ interactive=False,
+ database=self.connection.alias)
if settings.CACHE_BACKEND.startswith('db://'):
from django.core.cache import parse_backend_uri, cache
Please sign in to comment.
Something went wrong with that request. Please try again.