Skip to content

Commit 2743f75

Browse files
committed
make tests compatible with Django 1.7+
1 parent 49ffbdd commit 2743f75

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

runtests.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import sys
44
from os.path import dirname, abspath
55

6+
import django
67
from django.conf import settings
78

89

910
settings.configure(
10-
DATABASES = {
11+
DATABASES={
1112
'default': {
1213
'ENGINE': 'django.db.backends.sqlite3',
1314
'NAME': ':memory:'
@@ -27,6 +28,9 @@
2728
)
2829

2930

31+
if django.VERSION >= (1, 7):
32+
django.setup()
33+
3034

3135
def runtests(**test_args):
3236
from django.test.utils import get_runner

0 commit comments

Comments
 (0)