comparison MoinMoin/groups/backends/_tests/test_config_group.py @ 4803:167db6117bb4

Groups2009: pep8 fixes and typo elimination. BaseGroup._iter optimization. Test of group names mapping was removed.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Thu, 11 Jun 2009 13:48:54 +0200
parents 3b05bf18c0d1
children 3cea38408fe6
comparison
equal deleted inserted replaced
4802:878b5a87ba3b 4803:167db6117bb4
8 2009 by MoinMoin:DmitrijsMilajevs 8 2009 by MoinMoin:DmitrijsMilajevs
9 @license: GNU GPL, see COPYING for details. 9 @license: GNU GPL, see COPYING for details.
10 10
11 """ 11 """
12 12
13 from MoinMoin.groups.backends._tests import BackendTest, BackendTestMapping, Config 13 from MoinMoin.groups.backends._tests import BackendTest
14 from MoinMoin.groups.backends import config_group 14 from MoinMoin.groups.backends import config_group
15 from MoinMoin.groups import GroupManager 15 from MoinMoin.groups import GroupManager
16 from MoinMoin._tests import wikiconfig
17
16 18
17 class TestConfigBackend(BackendTest): 19 class TestConfigBackend(BackendTest):
18 20
19 class Config(Config): 21 class Config(wikiconfig.Config):
22
20 def group_manager_init(self, request): 23 def group_manager_init(self, request):
21 self.config_groups = BackendTest.test_groups 24 self.config_groups = BackendTest.test_groups
22 return GroupManager(backends=[config_group.Backend(request)]) 25 return GroupManager(backends=[config_group.Backend(request)])
23 26
24 class TestConfigBackendMapping(TestConfigBackend):
25
26 class Config(Config):
27 def group_manager_init(self, request):
28 backend = config_group.Backend(request, TestConfigBackend.mapped_groups)
29
30 backend.to_backend_name = self.to_backend_name
31 backend.to_group_name = self.to_group_name
32
33 return GroupManager(backends=[backend])
34 27
35 coverage_modules = ['MoinMoin.groups.backends.config_group'] 28 coverage_modules = ['MoinMoin.groups.backends.config_group']
36 29