changeset 581:cfc4cefc5182 pytest2

init_test_app and deinit_test_app called in test_backend_fs2.
author pkumar <contactprashantat@gmail.com>
date Tue, 21 Jun 2011 11:54:42 +0530
parents 229747dcc230
children 32025c625b66
files MoinMoin/storage/_tests/test_backends_fs2.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/storage/_tests/test_backends_fs2.py	Tue Jun 21 02:20:24 2011 +0530
+++ b/MoinMoin/storage/_tests/test_backends_fs2.py	Tue Jun 21 11:54:42 2011 +0530
@@ -12,6 +12,8 @@
 from MoinMoin.storage.backends.fs2 import FS2Backend
 from MoinMoin.storage.backends.router import RouterBackend
 
+from MoinMoin.conftest import init_test_app, deinit_test_app
+from MoinMoin._tests import wikiconfig
 class TestFS2Backend(BackendTest):
 
     def create_backend(self):
@@ -30,6 +32,8 @@
             shutil.rmtree(self.tempdir)
 
     def test_large(self):
+        # temporary hack till we use some cleanup mechnism on tests.
+        self.app, self.ctx = init_test_app(wikiconfig.Config)
         i = self.backend.create_item(u'large')
         r = i.create_revision(0)
         r['0'] = 'x' * 100
@@ -47,6 +51,7 @@
         for x in xrange(1000):
             assert r.read(8 * 10) == 'lalala! ' * 10
         assert r.read() == ''
+        deinit_test_app(self.app, self.ctx)
 
     def test_all_unlocked(self):
         i1 = self.backend.create_item(u'existing now 1')