Control: tag -1 + patch

On Sun, 03 Aug 2014, Neil Williams wrote:
> I've now been able to test django-testscenarios against django1.7
> and what I thought should be a simple test has shown significant issues.

Same issues as django-restricted-resource and a small patch to fix
it is attached.

> Any hints on a fix for django-testscenarios are welcome but support for
> django1.6 *must* be retained.

The patch is backwards compatible.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Discover the Debian Administrator's Handbook:
→ http://debian-handbook.info/get/
diff -Nru django-testscenarios-0.7.3/debian/changelog 
django-testscenarios-0.7.3/debian/changelog
--- django-testscenarios-0.7.3/debian/changelog 2014-07-19 15:14:11.000000000 
+0200
+++ django-testscenarios-0.7.3/debian/changelog 2014-08-04 15:22:43.000000000 
+0200
@@ -1,3 +1,9 @@
+django-testscenarios (0.7.3-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload to add Django 1.7 support.
+
+ -- Raphaël Hertzog <[email protected]>  Mon, 04 Aug 2014 15:22:29 +0200
+
 django-testscenarios (0.7.3-2) unstable; urgency=medium
 
   * Add autopkgtest support
diff -Nru django-testscenarios-0.7.3/debian/patches/django1.7-compat.patch 
django-testscenarios-0.7.3/debian/patches/django1.7-compat.patch
--- django-testscenarios-0.7.3/debian/patches/django1.7-compat.patch    
1970-01-01 01:00:00.000000000 +0100
+++ django-testscenarios-0.7.3/debian/patches/django1.7-compat.patch    
2014-08-04 15:22:01.000000000 +0200
@@ -0,0 +1,17 @@
+Description: Add Django 1.7 support
+Author: Raphaël Hertzog <[email protected]>
+Bug-Debian: http://bugs.debian.org/755661
+
+--- django-testscenarios-0.7.3.orig/django_testscenarios/tests.py
++++ django-testscenarios-0.7.3/django_testscenarios/tests.py
+@@ -29,6 +29,10 @@ from django_testscenarios.ubertest impor
+     TransactionTestCase,
+     TransactionTestCaseWithScenarios)
+ 
++import django
++if hasattr(django, 'setup'):
++    django.setup()
++
+ 
+ class TestModel(models.Model):
+     """
diff -Nru django-testscenarios-0.7.3/debian/patches/series 
django-testscenarios-0.7.3/debian/patches/series
--- django-testscenarios-0.7.3/debian/patches/series    1970-01-01 
01:00:00.000000000 +0100
+++ django-testscenarios-0.7.3/debian/patches/series    2014-08-04 
15:20:49.000000000 +0200
@@ -0,0 +1 @@
+django1.7-compat.patch

Reply via email to