Rename initial_data.json to emailtemplate.json

This commit is contained in:
Simon Thépot 2015-01-14 15:49:08 +01:00
parent f68c1b3ae9
commit b53d3ad9bc
3 changed files with 10 additions and 4 deletions

View File

@ -8,7 +8,7 @@ from django.db import models, migrations
from django.core import serializers
fixture_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../fixtures'))
fixture_filename = 'initial_data.json'
fixture_filename = 'emailtemplate.json'
def deserialize_fixture():
fixture_file = os.path.join(fixture_dir, fixture_filename)

View File

@ -28,7 +28,13 @@ class QuickDjangoTest(object):
'django.contrib.humanize',
'bootstrapform',
)
MIDDLEWARE_CLASSES = []
MIDDLEWARE_CLASSES = [
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
]
def __init__(self, *args, **kwargs):
self.apps = args
@ -44,7 +50,7 @@ class QuickDjangoTest(object):
"""
Figure out which version of Django's test suite we have to play with.
"""
if django.VERSION > (1, 2):
if django.VERSION >= (1, 2):
return 'new'
else:
return 'old'
@ -85,7 +91,7 @@ class QuickDjangoTest(object):
ROOT_URLCONF = self.apps[0] + '.urls',
)
if django.VERSION > (1, 7):
if django.VERSION >= (1, 7):
django.setup()
from django.test.simple import DjangoTestSuiteRunner