# Make sure the template loader cache is fixed _now_ (#448)
+from south.hacks import hacks
from south.management.commands.syncdb import Command as SyncCommand
# tests should always be up to date with the most recent model structure
management._commands['syncdb'] = 'django.core'
- management._commands['syncdb'] = MigrateAndSyncCommand()
+ management._commands['syncdb'] = MigrateAndSyncCommand()
+ # Avoid flushing data migrations.
+ # http://code.djangoproject.com/ticket/14661 introduced change that flushed custom
+ # sql during the test database creation (thus flushing the data migrations).
+ # we patch flush to be no-op during create_test_db, but still allow flushing
+ # after each test for non-transactional backends.