Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
PlonePAS.tests.test_membership_tool.MemberAreaTest Class Reference
Inheritance diagram for PlonePAS.tests.test_membership_tool.MemberAreaTest:
Inheritance graph
[legend]
Collaboration diagram for PlonePAS.tests.test_membership_tool.MemberAreaTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def test_funky_member_ids_1
def test_funky_member_ids_2
def test_memberareaCreationFlag_respected

Public Attributes

 mt
 md
 mid

Detailed Description

Definition at line 117 of file test_membership_tool.py.


Member Function Documentation

Definition at line 119 of file test_membership_tool.py.

00119 
00120     def afterSetUp(self):
00121         self.mt = mt = getToolByName(self.portal, 'portal_membership')
00122         self.md = md = getToolByName(self.portal, 'portal_memberdata')
00123         # Enable member-area creation
00124         self.mt.memberareaCreationFlag = 1
00125         # Those are all valid chars in Zope.
00126         self.mid = "Member #1 - Houston, TX. ($100)"
00127         self.loginAsPortalOwner()

Definition at line 128 of file test_membership_tool.py.

00128 
00129     def test_funky_member_ids_1(self):
00130         mid = self.mid
00131         minfo = (mid, 'pw', ['Member'], [])
00132 
00133         # Create a new User
00134         self.portal.acl_users._doAddUser(*minfo)
00135        self.mt.createMemberArea,(mid)

Definition at line 136 of file test_membership_tool.py.

00136 
00137     def test_funky_member_ids_2(self):
00138         # Forward-slash is not allowed
00139         mid = self.mid + '/'
00140         minfo = (mid, 'pw', ['Member'], [])
00141 
00142         # Create a new User
00143         self.portal.acl_users._doAddUser(*minfo)
00144         self.mt.createMemberArea(mid)

Definition at line 145 of file test_membership_tool.py.

00145 
00146     def test_memberareaCreationFlag_respected(self):
00147         self.portal.acl_users._doAddUser('foo', 'pw', ['Member'], [])
00148         self.portal.acl_users._doAddUser('bar', 'pw', ['Member'], [])
00149 
00150         self.failIf('foo' in self.portal.Members.objectIds())
00151         self.failIf('bar' in self.portal.Members.objectIds())
00152 
00153         self.mt.createMemberarea('foo')
00154         self.failUnless('foo' in self.portal.Members.objectIds())
00155 
00156         self.mt.memberareaCreationFlag = 0
00157         self.mt.createMemberArea('bar')
00158         self.failIf('bar' in self.portal.Members.objectIds())


Member Data Documentation

Definition at line 121 of file test_membership_tool.py.

Definition at line 125 of file test_membership_tool.py.

Definition at line 120 of file test_membership_tool.py.


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