Blame 0001-make-tests-succeed-on-Django-1.7.patch

ca3bfde
From fc83133312ef976dd24905136967102351b814ea Mon Sep 17 00:00:00 2001
ca3bfde
From: Matthias Runge <mrunge@redhat.com>
ca3bfde
Date: Fri, 17 Oct 2014 10:47:19 +0200
ca3bfde
Subject: [PATCH] make tests succeed on Django-1.7
ca3bfde
ca3bfde
---
ca3bfde
 django_pyscss/utils.py  | 3 ++-
ca3bfde
 testproject/runtests.py | 4 ++++
ca3bfde
 2 files changed, 6 insertions(+), 1 deletion(-)
ca3bfde
ca3bfde
diff --git a/django_pyscss/utils.py b/django_pyscss/utils.py
ca3bfde
index 8ff5ad9..d668280 100644
ca3bfde
--- a/django_pyscss/utils.py
ca3bfde
+++ b/django_pyscss/utils.py
ca3bfde
@@ -13,6 +13,7 @@ def find_all_files(glob):
ca3bfde
     """
ca3bfde
     for finder in finders.get_finders():
ca3bfde
         for path, storage in finder.list([]):
ca3bfde
-            if fnmatch.fnmatchcase(os.path.join(storage.prefix or '', path),
ca3bfde
+            if fnmatch.fnmatchcase(os.path.join(getattr(storage, 'prefix', '')
ca3bfde
+                                                or '', path),
ca3bfde
                                    glob):
ca3bfde
                 yield path, storage
ca3bfde
diff --git a/testproject/runtests.py b/testproject/runtests.py
ca3bfde
index 394f24a..09930f0 100644
ca3bfde
--- a/testproject/runtests.py
ca3bfde
+++ b/testproject/runtests.py
ca3bfde
@@ -3,6 +3,10 @@ import os
ca3bfde
 import sys
ca3bfde
 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings")
ca3bfde
 
ca3bfde
+import django
ca3bfde
+if hasattr(django, 'setup'):
ca3bfde
+    django.setup()
ca3bfde
+
ca3bfde
 from django.test.utils import get_runner
ca3bfde
 from django.conf import settings
ca3bfde
 
ca3bfde
-- 
ca3bfde
1.9.3
ca3bfde