Fixed test suite execution for Django>=1.6

This commit is contained in:
Fabián Ezequiel Gallina 2014-04-30 08:39:33 -03:00
parent 97c657f2a4
commit 91e5aa5f2c
2 changed files with 16 additions and 16 deletions

View File

@ -3,6 +3,22 @@ from django.utils.importlib import import_module
# Workaround for tests.
try:
minimal = {
'DATABASES': {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'mydatabase'
}
},
'ROOT_URLCONF': '',
'STATSD_CLIENT': 'django_statsd.clients.null',
'STATSD_PREFIX': None,
'METLOG': None
}
if not settings.configured:
settings.configure(**minimal)
patches = getattr(settings, 'STATSD_PATCHES', [])
except ImportError:
patches = []

View File

@ -6,22 +6,6 @@ from django.conf import settings
from nose.exc import SkipTest
from nose import tools as nose_tools
minimal = {
'DATABASES': {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'mydatabase'
}
},
'ROOT_URLCONF': '',
'STATSD_CLIENT': 'django_statsd.clients.null',
'STATSD_PREFIX': None,
'METLOG': None
}
if not settings.configured:
settings.configure(**minimal)
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseForbidden
from django.test import TestCase