'django.middleware.csrf.CsrfViewMiddleware',
]
-MIDDLEWARE_CLASSES.append(
- 'django.contrib.admindocs.middleware.XViewMiddleware')
+if django.VERSION < (1, 7):
+ MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware')
+else:
+ MIDDLEWARE_CLASSES.append(
+ 'django.contrib.admindocs.middleware.XViewMiddleware')
# Globalization
},
}
-DATABASES['default']['TEST'] = {
- 'CHARSET': 'utf8',
-}
+if django.VERSION < (1, 7):
+ DATABASES['default']['TEST_CHARSET'] = 'utf8'
+else:
+ DATABASES['default']['TEST'] = {
+ 'CHARSET': 'utf8',
+ }
#
# Patchwork settings
#
STATIC_ROOT = '/srv/patchwork/htdocs/static'
+
import os
import time
-from django.contrib.staticfiles.testing import StaticLiveServerTestCase
+try: # django 1.7+
+ from django.contrib.staticfiles.testing import StaticLiveServerTestCase
+except:
+ from django.test import LiveServerTestCase as StaticLiveServerTestCase
from selenium.common.exceptions import (
NoSuchElementException, StaleElementReferenceException,
TimeoutException)