Skip to content

Commit 1006bbc

Browse files
committed
Fix tests on django versions <1.6
1 parent 2700862 commit 1006bbc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/runtests.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ def runtests(foo, settings='settings', extra=[], test_builtin=False):
1313
if not test_builtin:
1414
apps = filter(lambda name: not name.startswith('django.contrib.'),
1515
apps)
16+
# pre-1.6 test runners don't understand full module names
17+
import django
18+
if django.VERSION < (1, 6)
19+
apps = [app.replace('django.contrib.', '') for app in apps]
1620
execute(['./manage.py', 'test', '--settings', settings] + extra + apps)
1721

1822

0 commit comments

Comments
 (0)