changeset 579:9db7ce03cbc5 pytest2

test_init_app called in test_wiki_dicts and test_wiki_groups
author pkumar <contactprashantat@gmail.com>
date Tue, 21 Jun 2011 02:14:03 +0530
parents 6cbcec2eb46f
children 229747dcc230
files MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py MoinMoin/datastruct/backends/_tests/test_wiki_groups.py
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Tue Jun 21 01:57:36 2011 +0530
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Tue Jun 21 02:14:03 2011 +0530
@@ -13,7 +13,8 @@
 from MoinMoin.datastruct.backends import wiki_dicts
 from MoinMoin.config import SOMEDICT
 from MoinMoin._tests import become_trusted, update_item
-
+from MoinMoin.conftest import init_test_app, deinit_test_app
+from MoinMoin._tests import wikiconfig
 DATA = "This is a dict item."
 
 
@@ -23,6 +24,8 @@
     # is WikiDicts backend.
 
     def setup_method(self, method):
+        # temporary hack till we apply test cleanup mechanism on tests.
+        init_test_app(wikiconfig.Config)
         become_trusted()
 
         somedict = {u"First": u"first item",
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Tue Jun 21 01:57:36 2011 +0530
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Tue Jun 21 02:14:03 2011 +0530
@@ -20,7 +20,8 @@
 from MoinMoin.config import USERGROUP
 from MoinMoin.security import ContentACL
 from MoinMoin.user import User
-from MoinMoin._tests import become_trusted, create_random_string_list, update_item
+from MoinMoin._tests import become_trusted, create_random_string_list, update_item, wikiconfig
+from MoinMoin.conftest import init_test_app, deinit_test_app
 
 DATA = "This is a group item"
 
@@ -31,6 +32,8 @@
     # is WikiGroups backend.
 
     def setup_method(self, method):
+        # temporary hack till we apply test cleanup mechanism on tests.
+        init_test_app(wikiconfig.Config)
         become_trusted()
         for group, members in self.test_groups.iteritems():
             update_item(group, 0, {USERGROUP: members}, DATA)