make tests succeed on Django-1.7

This commit is contained in:
Matthias Runge 2014-10-17 10:47:19 +02:00
parent 2c5dd9da41
commit fc83133312
2 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ def find_all_files(glob):
"""
for finder in finders.get_finders():
for path, storage in finder.list([]):
if fnmatch.fnmatchcase(os.path.join(storage.prefix or '', path),
if fnmatch.fnmatchcase(os.path.join(getattr(storage, 'prefix', '')
or '', path),
glob):
yield path, storage

View File

@ -3,6 +3,10 @@ import os
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings")
import django
if hasattr(django, 'setup'):
django.setup()
from django.test.utils import get_runner
from django.conf import settings