Commits

Hynek Cernoch committed cd97895

Fixed tests with Satchmo and South enabled. Closes #2

South prevents some initial data loading to the test database.

  • Participants
  • Parent commits f19908f

Comments (0)

Files changed (1)

File registration/tests.py

         and creates a new user and redirects after a valid submission.
         
         """
+        if 'south' in settings.INSTALLED_APPS and 'satchmo_store.contact' in settings.INSTALLED_APPS:
+            # South prevents some initial data loading for the test database
+            from satchmo_store.contact.models import ContactRole
+            if not ContactRole.objects.filter(pk='Customer').count():
+                ContactRole('Customer', name='Customer').save()
         try:
             from livesettings import config_get
             config_get('SHOP', 'ACCOUNT_VERIFICATION').update('EMAIL')