Skip to content

Commit 8d91831

Browse files
author
Rocky Meza
committed
Added discover runner for Django < 1.6.
1 parent 6992c5e commit 8d91831

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ def read(fname):
1919
tests_require = [
2020
'Pillow',
2121
'django-compressor>=1.3',
22+
'django-discover-runner',
2223
]
2324

25+
2426
version = (0, 0, 1, 'final')
2527

2628

testproject/testproject/settings.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
1414

1515

16+
from django import VERSION as DJANGO_VERSION
17+
if DJANGO_VERSION[:2] < (1, 6):
18+
TEST_RUNNER = 'discover_runner.DiscoverRunner'
19+
20+
1621
# Quick-start development settings - unsuitable for production
1722
# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
1823

@@ -43,6 +48,9 @@
4348
'testproject.testapp2',
4449
)
4550

51+
if DJANGO_VERSION[:2] < (1, 6):
52+
INSTALLED_APPS += ('discover_runner', )
53+
4654
MIDDLEWARE_CLASSES = (
4755
'django.contrib.sessions.middleware.SessionMiddleware',
4856
'django.middleware.common.CommonMiddleware',
@@ -108,7 +116,7 @@
108116
'version': 1,
109117
'disable_existing_loggers': True,
110118
'handlers': {
111-
'console':{
119+
'console': {
112120
'level': 'DEBUG',
113121
'class': 'logging.StreamHandler',
114122
},

0 commit comments

Comments
 (0)