changeset 582:32025c625b66 pytest2

init_test_app and deinit_test_app called in test_backend_memory.
author pkumar <contactprashantat@gmail.com>
date Tue, 21 Jun 2011 15:04:12 +0530
parents cfc4cefc5182
children 7f4503715326
files MoinMoin/storage/_tests/test_backends_memory.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/_tests/test_backends_memory.py	Tue Jun 21 11:54:42 2011 +0530
+++ b/MoinMoin/storage/_tests/test_backends_memory.py	Tue Jun 21 15:04:12 2011 +0530
@@ -12,7 +12,8 @@
 
 from MoinMoin.storage._tests.test_backends import BackendTest
 from MoinMoin.storage.backends.memory import MemoryBackend, TracingBackend
-
+from MoinMoin.conftest import init_test_app, deinit_test_app
+from MoinMoin._tests import wikiconfig
 class TestMemoryBackend(BackendTest):
     """
     Test the MemoryBackend
@@ -25,12 +26,14 @@
         pass
 
 class TestTracingBackend(BackendTest):
-
     def create_backend(self):
+        # temporary hack till we apply some cleanup mechanism on tests         
+        self.app, self.ctx = init_test_app(wikiconfig.Config)
         import random
         return TracingBackend()#"/tmp/codebuf%i.py" % random.randint(1, 2**30))
 
     def kill_backend(self):
+        deinit_test_app(self.app, self.ctx)
         func = self.backend.get_func()
         try:
             func(MemoryBackend()) # should not throw any exc