File: fix-run_tests.py-with-django-1.7.patch

package info (click to toggle)
python-jingo 0.7-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 268 kB
  • ctags: 171
  • sloc: python: 547; makefile: 105
file content (20 lines) | stat: -rw-r--r-- 633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Description: Fix run_tests.py with Django 1.7
 In Django 1.7, we need to call django.setup(). This patch does it to fix the
 unit tests.
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/765160
Forwarded: no
Last-Update: 2014-10-17

--- python-jingo-0.7.orig/run_tests.py
+++ python-jingo-0.7/run_tests.py
@@ -9,5 +9,9 @@ os.environ['DJANGO_SETTINGS_MODULE'] = '
 os.environ['PYTHONPATH'] = os.pathsep.join([ROOT,
                                             os.path.join(ROOT, 'examples')])
 
+import django
+if hasattr(django, 'setup'):
+    django.setup()
+
 if __name__ == '__main__':
     nose.main()