Back to index

moin  1.9.0~rc2
Classes | Public Member Functions | Public Attributes
MoinMoin.datastruct.backends._tests.test_composite_groups.TestCompositeGroup Class Reference

List of all members.

Classes

class  Config

Public Member Functions

def setup_method
def test_getitem
def test_clashed_getitem
def test_iter
def test_contains

Public Attributes

 groups

Detailed Description

Definition at line 27 of file test_composite_groups.py.


Member Function Documentation

Definition at line 57 of file test_composite_groups.py.

00057 
00058     def setup_method(self, method):
00059         self.groups = self.request.groups

Check the case when groups of the same name are defined in multiple
backends. __getitem__ should return the first match (backends are
considered in the order they are given in the backends list).

Definition at line 63 of file test_composite_groups.py.

00063 
00064     def test_clashed_getitem(self):
00065         """
00066         Check the case when groups of the same name are defined in multiple
00067         backends. __getitem__ should return the first match (backends are
00068         considered in the order they are given in the backends list).
00069         """
00070         admin_group = self.groups[u'AdminGroup']
00071 
00072         # TheHacker added himself to the second backend, but that must not be
00073         # taken into consideration, because AdminGroup is defined in first
00074         # backend and we only use the first match.
00075         assert u'TheHacker' not in admin_group

Definition at line 83 of file test_composite_groups.py.

00083 
00084     def test_contains(self):
00085         assert u'UserGroup' in self.groups
00086         assert u'not existing group' not in self.groups
00087 

Definition at line 60 of file test_composite_groups.py.

00060 
00061     def test_getitem(self):
00062         raises(GroupDoesNotExistError, lambda: self.groups[u'NotExistingGroup'])

Definition at line 76 of file test_composite_groups.py.

00076 
00077     def test_iter(self):
00078         all_group_names = list(self.groups)
00079 
00080         assert 5 == len(all_group_names)
00081         # There are no duplicates
00082         assert len(set(all_group_names)) == len(all_group_names)


Member Data Documentation

Definition at line 58 of file test_composite_groups.py.


The documentation for this class was generated from the following file: