Only enable south in tests if were testing with Django 1.6

This commit is contained in:
Karl Hobley 2014-07-23 11:36:11 +01:00
parent b48089c88c
commit 6d50ae5d65

View file

@ -1,5 +1,6 @@
import os
import django
from django.conf import global_settings
@ -57,7 +58,6 @@ INSTALLED_APPS = [
'django.contrib.admin',
'taggit',
'south',
'compressor',
'wagtail.wagtailcore',
@ -76,6 +76,11 @@ INSTALLED_APPS = [
'wagtail.tests',
]
# If we are using Django 1.6, add South to INSTALLED_APPS
if django.VERSION[:2] == (1, 6):
INSTALLED_APPS.append('south')
# Using DatabaseCache to make sure that the cache is cleared between tests.
# This prevents false-positives in some wagtail core tests where we are
# changing the 'wagtail_root_paths' key which may cause future tests to fail.