mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-12-24 15:48:49 +01:00
Rename initial_data.json to emailtemplate.json
This commit is contained in:
parent
f68c1b3ae9
commit
b53d3ad9bc
@ -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)
|
||||
|
12
quicktest.py
12
quicktest.py
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user