changeset 584:fefd0baf5c89 pytest2

init_test_app and deinit_test_app called in test_backend_router
author pkumar <contactprashantat@gmail.com>
date Tue, 21 Jun 2011 19:18:08 +0530
parents 7f4503715326
children 6610f364cfae
files MoinMoin/storage/_tests/test_backends_router.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/_tests/test_backends_router.py	Tue Jun 21 15:29:10 2011 +0530
+++ b/MoinMoin/storage/_tests/test_backends_router.py	Tue Jun 21 19:18:08 2011 +0530
@@ -16,6 +16,8 @@
 from MoinMoin.storage._tests.test_backends import BackendTest
 from MoinMoin.storage.backends.memory import MemoryBackend
 from MoinMoin.storage.backends.router import RouterBackend
+from MoinMoin.conftest import init_test_app, deinit_test_app
+from MoinMoin._tests import wikiconfig
 
 class TestRouterBackend(BackendTest):
     """
@@ -23,6 +25,8 @@
     """
 
     def create_backend(self):
+        # temporary hack till we get some cleanup mechanism for the tests 
+        self.app, self.ctx = init_test_app(wikiconfig.Config)
         self.root = MemoryBackend()
         self.ns_user_profile = app.cfg.ns_user_profile
         self.users = MemoryBackend()
@@ -32,6 +36,7 @@
         return RouterBackend(self.mapping, index_uri='sqlite://')
 
     def kill_backend(self):
+        deinit_test_app(self.app, self.ctx)
         pass