[Python-modules-commits] r25505 - in packages/flask-autoindex/trunk/debian (3 files)

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Sun Aug 11 11:25:42 UTC 2013


    Date: Sunday, August 11, 2013 @ 11:25:40
  Author: sramacher
Revision: 25505

Upstream patch to fix tests with flask 0.10.1 (Closes: 719302)

Added:
  packages/flask-autoindex/trunk/debian/patches/flask-0.10.patch
Modified:
  packages/flask-autoindex/trunk/debian/changelog
  packages/flask-autoindex/trunk/debian/patches/series

Modified: packages/flask-autoindex/trunk/debian/changelog
===================================================================
--- packages/flask-autoindex/trunk/debian/changelog	2013-08-11 06:20:22 UTC (rev 25504)
+++ packages/flask-autoindex/trunk/debian/changelog	2013-08-11 11:25:40 UTC (rev 25505)
@@ -1,3 +1,10 @@
+flask-autoindex (0.5-3) UNRELEASED; urgency=low
+
+  * debian/patches/flask-0.10.patch: Upstream patch to fix test suite with
+    flask 0.10. (Closes: #719302)
+
+ -- Sebastian Ramacher <sramacher at debian.org>  Sun, 11 Aug 2013 13:22:36 +0200
+
 flask-autoindex (0.5-2) unstable; urgency=low
 
   * Upload to unstable.

Added: packages/flask-autoindex/trunk/debian/patches/flask-0.10.patch
===================================================================
--- packages/flask-autoindex/trunk/debian/patches/flask-0.10.patch	                        (rev 0)
+++ packages/flask-autoindex/trunk/debian/patches/flask-0.10.patch	2013-08-11 11:25:40 UTC (rev 25505)
@@ -0,0 +1,42 @@
+Description: Pass tests with Flask 0.10.1
+Origin: upsteam,
+ https://github.com/sublee/flask-autoindex/commit/5e920c5c7ea675f7cae2f6e83b44209136f9b68d
+Last-Update: 2013-08-11
+
+diff --git a/tests/__init__.py b/tests/__init__.py
+index 8e542c2..5fe21e8 100644
+--- a/tests/__init__.py
++++ b/tests/__init__.py
+@@ -133,17 +133,18 @@ class ApplicationTestCase(unittest.TestCase):
+         self.app = Flask(__name__)
+         self.app2 = Flask(__name__)
+         self.idx = AutoIndex(self.app, browse_root, add_url_rules=True)
+-        self.idx2 = AutoIndex(self.app2,
++        self.idx2 = AutoIndex(self.app2, browse_root,
+                               silk_options={'silk_path': '/myicons'})
+         @self.app2.route('/')
+         @self.app2.route('/<path:path>')
+-        def autoindex(path='.'):
++        def autoindex_test(path='.'):
+             return self.idx2.render_autoindex(path, browse_root)
+ 
+     def get(self, path):
+         return self.app.test_client().get(path)
+ 
+     def get2(self, path):
++        self.app2.config['TESTING'] = True
+         return self.app2.test_client().get(path)
+ 
+     def test_css(self):
+@@ -158,9 +159,8 @@ class ApplicationTestCase(unittest.TestCase):
+         assert rv.data == rv2.data
+ 
+     def test_autoindex(self):
+-        for get in [self.get, self.get2]:
+-            rv = get('/.')
+-            assert '__init__.py' in rv.data
++        assert '__init__.py' in self.get('/').data
++        assert '__init__.py' in self.get2('/').data
+ 
+     def test_own_static_file(self):
+         rv = self.get('/static/helloworld.txt')

Modified: packages/flask-autoindex/trunk/debian/patches/series
===================================================================
--- packages/flask-autoindex/trunk/debian/patches/series	2013-08-11 06:20:22 UTC (rev 25504)
+++ packages/flask-autoindex/trunk/debian/patches/series	2013-08-11 11:25:40 UTC (rev 25505)
@@ -1 +1,2 @@
 doc-silk-license.patch
+flask-0.10.patch




More information about the Python-modules-commits mailing list