Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions
CMFDefault.tests.test_MembershipTool.MembershipToolTests Class Reference

List of all members.

Public Member Functions

def setUp
def test_z2interfaces
def test_z3interfaces
def test_MembersFolder_methods

Public Attributes

 site

Private Member Functions

def _makeOne

Detailed Description

Definition at line 32 of file test_MembershipTool.py.


Member Function Documentation

def CMFDefault.tests.test_MembershipTool.MembershipToolTests._makeOne (   self,
  args,
  kw 
) [private]

Definition at line 34 of file test_MembershipTool.py.

00034 
00035     def _makeOne(self, *args, **kw):
00036         from Products.CMFDefault.MembershipTool import MembershipTool
00037 
00038         return MembershipTool(*args, **kw)

Definition at line 39 of file test_MembershipTool.py.

00039 
00040     def setUp(self):
00041         self.site = DummySite('site')
00042         self.site._setObject( 'portal_membership', self._makeOne() )

Definition at line 58 of file test_MembershipTool.py.

00058 
00059     def test_MembersFolder_methods(self):
00060         mtool = self.site.portal_membership
00061         self.assertEqual( mtool.getMembersFolder(), None )
00062         self.site._setObject( 'Members', DummyFolder() )
00063         self.assertEqual( mtool.getMembersFolder(), self.site.Members )
00064         mtool.setMembersFolderById(id='foo')
00065         self.assertEqual( mtool.getMembersFolder(), None )
00066         self.site._setObject( 'foo', DummyFolder() )
00067         self.assertEqual( mtool.getMembersFolder(), self.site.foo )
00068         mtool.setMembersFolderById()
00069         self.assertEqual( mtool.getMembersFolder(), None )
00070 

Definition at line 43 of file test_MembershipTool.py.

00043 
00044     def test_z2interfaces(self):
00045         from Interface.Verify import verifyClass
00046         from Products.CMFDefault.interfaces.portal_membership \
00047                 import portal_membership as IMembershipTool
00048         from Products.CMFDefault.MembershipTool import MembershipTool
00049 
00050         verifyClass(IMembershipTool, MembershipTool)

Definition at line 51 of file test_MembershipTool.py.

00051 
00052     def test_z3interfaces(self):
00053         from zope.interface.verify import verifyClass
00054         from Products.CMFDefault.interfaces import IMembershipTool
00055         from Products.CMFDefault.MembershipTool import MembershipTool
00056 
00057         verifyClass(IMembershipTool, MembershipTool)


Member Data Documentation

Definition at line 40 of file test_MembershipTool.py.


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