From 6d50ae5d65d47ce1462547b6b9e9bb06c118792d Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Wed, 23 Jul 2014 11:36:11 +0100 Subject: [PATCH] Only enable south in tests if were testing with Django 1.6 --- wagtail/tests/settings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wagtail/tests/settings.py b/wagtail/tests/settings.py index 1ef1c5ab1..444baca65 100644 --- a/wagtail/tests/settings.py +++ b/wagtail/tests/settings.py @@ -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.