af41779
diff -up Flask-AutoIndex-0.4.1/tests/__init__.py.orig Flask-AutoIndex-0.4.1/tests/__init__.py
af41779
--- Flask-AutoIndex-0.4.1/tests/__init__.py.orig	2013-08-11 18:47:54.790493349 -0300
af41779
+++ Flask-AutoIndex-0.4.1/tests/__init__.py	2013-08-11 18:48:54.947495653 -0300
af41779
@@ -133,11 +133,11 @@ class ApplicationTestCase(unittest.TestC
af41779
         self.app = Flask(__name__)
af41779
         self.app2 = Flask(__name__ + '2')
af41779
         self.idx = AutoIndex(self.app, browse_root, add_url_rules=True)
af41779
-        self.idx2 = AutoIndex(self.app2, silk_path='/myicons')
af41779
+        self.idx2 = AutoIndex(self.app2, browse_root, silk_path='/myicons')
af41779
         #self.idx3 = AutoIndex()
af41779
         @self.app2.route('/')
af41779
         @self.app2.route('/<path:path>')
af41779
-        def autoindex(path='.'):
af41779
+        def autoindex_test(path='.'):
af41779
             return self.idx2.render_autoindex(path, browse_root)
af41779
         #def create_app(__name__):
af41779
         #    app = Flask(__name__)
af41779
@@ -149,6 +149,7 @@ class ApplicationTestCase(unittest.TestC
af41779
         return self.app.test_client().get(path)
af41779
 
af41779
     def get2(self, path):
af41779
+        self.app2.config['TESTING'] = True
af41779
         return self.app2.test_client().get(path)
af41779
 
af41779
     def test_css(self):
af41779
@@ -163,9 +164,8 @@ class ApplicationTestCase(unittest.TestC
af41779
         assert rv.data == rv2.data
af41779
 
af41779
     def test_autoindex(self):
af41779
-        for get in self.get, self.get2:
af41779
-            rv = get('/')
af41779
-            assert '__init__.py' in rv.data
af41779
+        assert '__init__.py' in self.get('/').data
af41779
+        assert '__init__.py' in self.get2('/').data
af41779
 
af41779
     def test_own_static_file(self):
af41779
         rv = self.get('/static/helloworld.txt')