changeset 4836:8be26b0ebc96

Groups2009: Tests for the WikiDicts and WikiGroups use default values for the group_manager_init and dict_manager_init. pep8 fixes.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 04 Jul 2009 17:40:22 +0100
parents cf3c81f67862
children fc0c70fe84f3
files MoinMoin/_tests/wikiconfig_groups.py MoinMoin/datastruct/backends/_tests/test_composite_dicts.py MoinMoin/datastruct/backends/_tests/test_config_groups.py MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py MoinMoin/datastruct/backends/_tests/test_wiki_groups.py
diffstat 5 files changed, 10 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/wikiconfig_groups.py	Sat Jul 04 14:14:30 2009 +0100
+++ b/MoinMoin/_tests/wikiconfig_groups.py	Sat Jul 04 17:40:22 2009 +0100
@@ -7,8 +7,7 @@
 """
 
 from wikiconfig import LocalConfig
-from MoinMoin.datastruct import WikiGroups
-from MoinMoin.datastruct import WikiDicts
+from MoinMoin.datastruct import WikiGroups, WikiDicts
 
 class Config(LocalConfig):
     group_manager_init = lambda self, request: WikiGroups(request)
--- a/MoinMoin/datastruct/backends/_tests/test_composite_dicts.py	Sat Jul 04 14:14:30 2009 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_composite_dicts.py	Sat Jul 04 17:40:22 2009 +0100
@@ -28,7 +28,6 @@
         other_dict = {u'SomeOtherTestDict': {u'One': '1',
                                              u'Two': '2'}}
 
-
         def dict_manager_init(self, request):
             return CompositeDicts(request,
                                   CompositeDicts(request, self.one_dict),
--- a/MoinMoin/datastruct/backends/_tests/test_config_groups.py	Sat Jul 04 14:14:30 2009 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_config_groups.py	Sat Jul 04 17:40:22 2009 +0100
@@ -10,7 +10,7 @@
 
 """
 
-from  MoinMoin.datastruct.backends._tests import GroupsBackendTest
+from MoinMoin.datastruct.backends._tests import GroupsBackendTest
 from MoinMoin.datastruct import ConfigGroups
 from MoinMoin._tests import wikiconfig
 
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Sat Jul 04 14:14:30 2009 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_dicts.py	Sat Jul 04 17:40:22 2009 +0100
@@ -9,12 +9,15 @@
 """
 
 
-from  MoinMoin.datastruct.backends._tests import DictsBackendTest
+from MoinMoin.datastruct.backends._tests import DictsBackendTest
 from MoinMoin.datastruct.backends import wiki_dicts
 from MoinMoin._tests import become_trusted, create_page, nuke_page
 
 
-class TestWikiDicstBackend(DictsBackendTest):
+class TestWikiDictsBackend(DictsBackendTest):
+
+    # Suppose that default configuration for the dict_manager_init is
+    # used which is WikiDicts backend.
 
     def setup_class(self):
         request = self.request
--- a/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Sat Jul 04 14:14:30 2009 +0100
+++ b/MoinMoin/datastruct/backends/_tests/test_wiki_groups.py	Sat Jul 04 17:40:22 2009 +0100
@@ -12,7 +12,7 @@
 from py.test import raises
 import re, shutil
 
-from  MoinMoin.datastruct.backends._tests import GroupsBackendTest
+from MoinMoin.datastruct.backends._tests import GroupsBackendTest
 from MoinMoin.datastruct import WikiGroups
 from MoinMoin import Page, security
 from MoinMoin.PageEditor import PageEditor
@@ -25,10 +25,8 @@
     Test what backend extracts from a group page and what is ignored.
     """
 
-    class Config(wikiconfig.Config):
-
-        def group_manager_init(self, request):
-            return WikiGroups(request)
+    # Suppose that default configuration for the group_manager_init is
+    # used which is WikiGroups backend.
 
     def test_CamelCase(self):
         text = """