예제 #1
0
 def groups(cfg):
     groups = {
         'PGroup': frozenset([
             'Antony',
             'Beatrice',
         ]),
         'AGroup': frozenset([
             'All',
         ]),
         # note: the next line is a INTENDED misnomer, there is "All" in
         # the group NAME, but not in the group members. This makes
         # sure that a bug that erroneously checked "in groupname" (instead
         # of "in groupmembers") does not reappear.
         'AllGroup': frozenset([]),  # note: intended misnomer
     }
     return ConfigGroups(groups)
예제 #2
0
            def groups(self):
                config_groups = {
                    'EditorGroup':
                    ['AdminGroup', 'John', 'JoeDoe', 'Editor1', 'John'],
                    'RecursiveGroup': ['Something', 'OtherRecursiveGroup'],
                    'OtherRecursiveGroup':
                    ['RecursiveGroup', 'Anything', 'NotExistingGroup'],
                    'ThirdRecursiveGroup': ['ThirdRecursiveGroup', 'Banana'],
                    'CheckNotExistingGroup': ['NotExistingGroup']
                }

                lazy_groups = {
                    'AdminGroup': ['Admin1', 'Admin2', 'John'],
                    'OtherGroup': ['SomethingOther'],
                    'EmptyGroup': []
                }

                return CompositeGroups(ConfigGroups(config_groups),
                                       ConfigLazyGroups(lazy_groups))
예제 #3
0
 def groups(self):
     groups = GroupsBackendTest.test_groups
     return ConfigGroups(groups)
예제 #4
0
 def groups(self):
     return CompositeGroups(
         ConfigGroups(self.first_backend_groups),
         ConfigGroups(self.second_backend_groups))