Commits

Tony Zhu committed 3917ff0

Fix loading initial_data for unit tests (#1327)

Comments (0)

Files changed (1)

south/hacks/django_1_0.py

 """
-Hacks for the Django 1.0/1.0.2 releases.
+Hacks for the Django 1.x releases.
 """
 
 import django
 class SkipFlushCommand(FlushCommand):
     def handle_noargs(self, **options):
         # no-op to avoid calling flush
+
+        # Django unit tests rely on flush to load the initial_data fixture
+        if options.get('load_initial_data'):
+            # Reinstall the initial_data fixture.
+            management.call_command('loaddata', 'initial_data', **options)
         return
 
 class Hacks: