Changeset 1126
- Timestamp:
- 06/27/08 09:35:15
- Files:
-
- qPloneComments/branches/plone-3.0/tests/framework.py (deleted)
- qPloneComments/branches/plone-3.0/tests/helperNotify.py (modified) (3 diffs)
- qPloneComments/branches/plone-3.0/tests/runalltests.py (deleted)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsCommenting.py (modified) (9 diffs)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsConfiglet.py (modified) (11 diffs)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsInstall.py (modified) (8 diffs)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsModeration.py (modified) (13 diffs)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsNotification.py (modified) (4 diffs)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsNotificationRecipients.py (modified) (6 diffs)
- qPloneComments/branches/plone-3.0/tests/testQPloneCommentsPermission.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPloneComments/branches/plone-3.0/tests/helperNotify.py
r1018 r1126 5 5 import sys 6 6 import os, os.path 7 from Products.MailHost.MailHost import MailBase 8 ver = "2.0.5" 9 try: 10 from Products.SecureMailHost.SecureMailHost import SecureMailBase 11 ver = "2.1" 12 except ImportError: 13 pass 7 from Products.SecureMailHost.SecureMailHost import SecureMailBase 14 8 15 9 PREFIX = os.path.abspath(os.path.dirname(__file__)) … … 61 55 62 56 def prepareMailSendTest(): 63 # patch MailHost 64 MailBase._send = _send_MH 65 if ver == "2.1": 66 # patch SecureMailHost 67 SecureMailBase.send = send_SMH 68 SecureMailBase._send = _send_SMH 57 # patch SecureMailHost 58 SecureMailBase.send = send_SMH 59 SecureMailBase._send = _send_SMH 69 60 70 61 def setProperties(prop_sheet, *props): … … 79 70 80 71 def getMails(): 81 return [file(output_file_path(f),'r').read() for f in os.listdir(output_file_path("")) if f.startswith('mail')] 82 72 return [file(output_file_path(f),'r').read() 73 for f in os.listdir(output_file_path("")) 74 if f.startswith('mail')] 83 75 84 76 def cleanOutputDir(): 85 77 for f in os.listdir(output_file_path("")): 86 if f.startswith('mail'): os.remove(output_file_path(f)) 78 if f.startswith('mail'): 79 os.remove(output_file_path(f)) qPloneComments/branches/plone-3.0/tests/testQPloneCommentsCommenting.py
r1018 r1126 3 3 # 4 4 5 import os, sys, string6 if __name__ == '__main__':7 execfile(os.path.join(sys.path[0], 'framework.py'))8 9 5 from Products.PloneTestCase import PloneTestCase 10 6 from Products.CMFCore.utils import getToolByName 11 7 from zExceptions import Unauthorized 12 import re13 8 14 9 PRODUCT = 'qPloneComments' … … 47 42 for user_id in USERS.keys(): 48 43 self.membership.addMember(user_id, USERS[user_id]['passw'] , USERS[user_id]['roles'], []) 49 44 50 45 # Add users to Discussion Manager group 51 46 portal_groups = getToolByName(self.portal, 'portal_groups') … … 298 293 self.discussion.getDiscussionFor(doc_obj) 299 294 doc_obj.discussion_reply("A Reply to '%s'" % self.doc_moder_off_id,"text of reply to '%s'" % self.doc_moder_off_id) 300 295 301 296 302 297 def testAddCommentToReplyAllowableUsers(self): … … 346 341 TestCommBase.afterSetUp(self) 347 342 # Preparation for functional testing 348 # Tern On Moderation and tern on Anonymous commenting 343 # Tern On Moderation and tern on Anonymous commenting 349 344 self.request.form['enable_anonymous_commenting'] = 'True' 350 345 self.request.form['enable_moderation'] = 'True' … … 360 355 TestCommBase.afterSetUp(self) 361 356 # Preparation for functional testing 362 # Tern On Moderation and tern off Anonymous commenting 357 # Tern On Moderation and tern off Anonymous commenting 363 358 self.request.form['enable_moderation'] = 'True' 364 359 self.portal.prefs_comments_setup() … … 366 361 TestMixinAnonymOff.afterSetUp(self) 367 362 TestMixinModerationOn.afterSetUp(self) 368 369 363 370 364 … … 387 381 TestCommBase.afterSetUp(self) 388 382 # Preparation for functional testing 389 # Tern Off Moderation and tern off Anonymous commenting 383 # Tern Off Moderation and tern off Anonymous commenting 390 384 self.portal.prefs_comments_setup() 391 385 # Initialize base classes … … 393 387 TestMixinModerationOff.afterSetUp(self) 394 388 395 396 397 TESTS = [TestModerationAnonymComm, TestModerationOFFAnonymComm, TestAnonymCommOFFModeration, TestOFFModerationOFFAnonymComm]398 389 399 390 def test_suite(): … … 406 397 407 398 return suite 408 409 if __name__ == '__main__':410 framework()411 qPloneComments/branches/plone-3.0/tests/testQPloneCommentsConfiglet.py
r1018 r1126 3 3 # 4 4 5 import os, sys, string6 if __name__ == '__main__':7 execfile(os.path.join(sys.path[0], 'framework.py'))8 9 5 from Products.PloneTestCase import PloneTestCase 10 6 from Products.CMFCore.utils import getToolByName 11 try: 12 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 13 except ImportError: 14 from Products.CMFCore.CMFCorePermissions import ManagePortal,ReplyToItem 15 from Products.MailHost.MailHost import MailBase 7 from Products.CMFCore.permissions import ReplyToItem 16 8 from AccessControl.SecurityManagement import noSecurityManager 17 9 … … 37 29 PloneTestCase.setupPloneSite() 38 30 39 40 31 def addUsers(self): 41 32 self.loginAsPortalOwner() … … 44 35 for user_id in USERS.keys(): 45 36 self.membership.addMember(user_id, USERS[user_id]['passw'] , USERS[user_id]['roles'], []) 46 37 47 38 # Add users to Discussion Manager group 48 39 portal_groups = getToolByName(self.portal, 'portal_groups') … … 66 57 doc_fti = portal_types.getTypeInfo('Document') 67 58 doc_fti._updateProperty('allow_discussion', 1) 68 59 69 60 # Make sure Documents are visible by default 70 61 # XXX only do this for plone 3 … … 87 78 member.setMemberProperties({'email':'creator@test.com'}) 88 79 #self.fail(member.getMemberId()+' :: '+member.getUserName()+' :: '+str(member.getRoles())+' :: '+member.getProperty('email')) 89 80 90 81 # Add testing document to portal 91 82 my_doc = self.portal.invokeFactory('Document', id='my_doc') 92 83 self.my_doc = self.portal['my_doc'] 93 84 self.my_doc.edit(text_format='plain', text='hello world') 94 95 85 96 86 def testAnonymousCommenting(self): … … 111 101 self.assert_(not 'Anonymous' in actual_reply_permission, \ 112 102 "'Reply to Item' permission set for %s. 'Anonymous' role NOT erased" % actual_reply_permission) 113 114 103 115 104 def testSwitchONModeration(self): … … 137 126 self.assert_(not getReplies(), "Viewing discussion item allow for Anonymous user") 138 127 139 140 128 def testSwitchOFFModeration(self): 141 129 addUsers(self) … … 159 147 self.assert_(replies, "No discussion item added or discussion forbidden for %s user" % u) 160 148 161 162 149 def testApproveNotification(self): 163 150 # Check ON Notification Anonymous Commenting … … 171 158 self.portal.prefs_comments_setup() 172 159 self.assert_(self.prefs.getProperty('enable_approve_notification')==0,"Approve Notification not terned OFF") 173 174 160 175 161 def testPublishedNotification(self): … … 186 172 187 173 188 189 TESTS = [TestConfiglet]190 191 174 def test_suite(): 192 175 from unittest import TestSuite, makeSuite … … 194 177 suite.addTest(makeSuite(TestConfiglet)) 195 178 return suite 196 197 if __name__ == '__main__':198 framework()199 qPloneComments/branches/plone-3.0/tests/testQPloneCommentsInstall.py
r1018 r1126 2 2 # Test product's installation/uninstallation 3 3 # 4 5 import os, sys, string6 if __name__ == '__main__':7 execfile(os.path.join(sys.path[0], 'framework.py'))8 4 9 5 from Products.PloneTestCase import PloneTestCase … … 31 27 def afterSetUp(self): 32 28 self.loginAsPortalOwner() 33 34 29 self.qi = self.portal.portal_quickinstaller 35 30 self.qi.installProduct(PRODUCT) … … 40 35 41 36 def test_skins_install(self): 42 skinstool=getToolByName(self.portal, 'portal_skins') 43 37 skinstool=getToolByName(self.portal, 'portal_skins') 44 38 for skin in skinstool.getSkinSelections(): 45 39 path = skinstool.getSkinPath(skin) 46 path = map( string.strip, string.split( path,',' ))40 path = map(str.strip, path.split(',')) 47 41 self.assert_(PRODUCT_SKIN_NAME in path, 'qPloneComments layer not found in %s' % skin) 48 42 … … 51 45 from Products.qPloneComments.interfaces import IPloneCommentsLayer 52 46 self.failUnless(IPloneCommentsLayer in registered_layers()) 53 54 #def test_versionedskin_install(self):55 # skinstool=getToolByName(self.portal, 'portal_skins')56 # mtool = getToolByName(self.portal, 'portal_migration')57 # plone_version = mtool.getFileSystemVersion()58 #59 # for skin in skinstool.getSkinSelections():60 # path = skinstool.getSkinPath(skin)61 # path = map( string.strip, string.split( path,',' ) )62 # self.assert_(PRODUCT+'/%s' % plone_version in path, 'qSEOptimizer versioned layer not found in %s' %skin)63 47 64 48 def test_propertysheet_install(self): … … 74 58 self.assert_(ANONYMOUS_COMMENTING_PID in property_ids, '%s propery not found in %s property' % (ANONYMOUS_COMMENTING_PID, PROPERTY_SHEET)) 75 59 76 77 60 def test_skins_uninstall(self): 78 61 self.qi.uninstallProducts([PRODUCT]) 79 62 self.assertNotEqual(self.qi.isProductInstalled(PRODUCT), True,'qPloneComments is already installed') 80 skinstool=getToolByName(self.portal, 'portal_skins') 63 skinstool=getToolByName(self.portal, 'portal_skins') 81 64 82 65 #self.assert_(not PRODUCT_SKIN_NAME in skinstool.objectIds(), '%s directory view found in portal_skins after uninstallation' % PRODUCT_SKIN_NAME) 83 66 for skin in skinstool.getSkinSelections(): 84 67 path = skinstool.getSkinPath(skin) 85 path = map( string.strip, string.split( path,',' ))68 path = map(str.strip, path.split(',')) 86 69 self.assert_(not PRODUCT_SKIN_NAME in path, '%s layer found in %s after uninstallation' % (PRODUCT_SKIN_NAME, skin)) 87 70 … … 89 72 self.qi.uninstallProducts([PRODUCT]) 90 73 self.assertNotEqual(self.qi.isProductInstalled(PRODUCT), True,'qPloneComments is already installed') 91 74 92 75 from plone.browserlayer.utils import registered_layers 93 76 from Products.qPloneComments.interfaces import IPloneCommentsLayer 94 77 self.failIf(IPloneCommentsLayer in registered_layers()) 95 78 96 #def test_versionedskin_uninstall(self):97 # self.qi.uninstallProducts([PRODUCT])98 # self.assertNotEqual(self.qi.isProductInstalled(PRODUCT), True,'qSEOptimizer is already installed')99 # skinstool=getToolByName(self.portal, 'portal_skins')100 # mtool = getToolByName(self.portal, 'portal_migration')101 # plone_version = mtool.getFileSystemVersion()102 #103 # for skin in skinstool.getSkinSelections():104 # path = skinstool.getSkinPath(skin)105 # path = map( string.strip, string.split( path,',' ) )106 # self.assert_(not PRODUCT+'/%s' % plone_version in path, 'qSEOptimizer versioned layer found in %s after uninstallation' %skin)107 108 79 def test_configlet_uninstall(self): 109 80 self.qi.uninstallProducts([PRODUCT]) 110 81 self.assertNotEqual(self.qi.isProductInstalled(PRODUCT), True,'qPloneComments is already installed') 111 82 112 83 configTool = getToolByName(self.portal, 'portal_controlpanel', None) 113 84 self.assert_(not CONFIGLET_ID in [a.getId() for a in configTool.listActions()], 'Configlet found after uninstallation') … … 116 87 self.qi.uninstallProducts([PRODUCT]) 117 88 self.assertNotEqual(self.qi.isProductInstalled(PRODUCT), True,'qPloneComments is already installed') 118 89 119 90 portal_properties = getToolByName(self.portal, 'portal_properties') 120 91 self.assert_(PROPERTY_SHEET in portal_properties.objectIds(), \ 121 92 'qPloneComments property_sheet not found in portal_properties after uninstallation') 122 93 123 94 def test_permission_added(self): 124 roles = [item['name'] for item in self.portal.rolesOfPermission(PERM_NAME)] 125 self.assert_( roles != [], '%s not installed'%PERM_NAME) 126 95 roles = [item['name'] for item in self.portal.rolesOfPermission(PERM_NAME)] 96 self.assert_( roles != [], '%s not installed'%PERM_NAME) 127 97 128 TESTS = [TestInstallation]129 98 130 99 def test_suite(): … … 133 102 suite.addTest(makeSuite(TestInstallation)) 134 103 return suite 135 136 if __name__ == '__main__':137 framework()138 qPloneComments/branches/plone-3.0/tests/testQPloneCommentsModeration.py
r1018 r1126 3 3 # 4 4 5 import os, sys, string6 if __name__ == '__main__':7 execfile(os.path.join(sys.path[0], 'framework.py'))8 9 5 from Products.PloneTestCase import PloneTestCase 10 6 from Products.CMFCore.utils import getToolByName … … 15 11 PloneTestCase.installProduct(PRODUCT) 16 12 PloneTestCase.setupPloneSite() 13 17 14 18 15 class TestModeration(PloneTestCase.FunctionalTestCase): … … 31 28 # Add all users 32 29 addMembers(self.portal, USERS) 33 30 34 31 # For correct testing notification - add 'portal_owner' with 'email' 35 32 #self.membership.addMember('portal_owner', 'secret' , ['Manager'], []) … … 40 37 # Add users to Discussion Manager group 41 38 add2Group(self.portal, 'DiscussionManager', DM_USERS_IDS) 42 39 43 40 #portal_groups = getToolByName(self.portal, 'portal_groups') 44 41 ##portal_groups.addGroup('DiscussionManager', roles=['DiscussionManager']) … … 50 47 doc_fti = portal_types.getTypeInfo('Document') 51 48 doc_fti._updateProperty('allow_discussion', 1) 52 49 53 50 # Make sure Documents are visible by default 54 51 # XXX only do this for plone 3 … … 84 81 doc = getattr(self.portal, 'doc_%s' % DM_USERS_IDS[0]) 85 82 roles = [r['name'] for r in self.portal.rolesOfPermission('Moderate Discussion') if r['selected'] == 'SELECTED'] 86 authorized_users = [user for user in COMMON_USERS_IDS if user !='anonym']83 authorized_users = [user for user in COMMON_USERS_IDS if user !='anonym'] 87 84 users_without_md_perm = [u for u in authorized_users if filter(lambda x: x not in roles, USERS[u]['roles'])] 88 85 for u in users_without_md_perm: … … 112 109 113 110 def testViewPublishButtonNonDMUsers(self): 114 # Publish button MUST BE ABSENT in document view form 111 # Publish button MUST BE ABSENT in document view form 115 112 # Pattern for publish button presence checking 116 113 if self.version.startswith("2.1"): … … 118 115 re.S|re.M) 119 116 elif self.version.startswith("2.5") or self.version.startswith('3.0'): 120 pattern = re.compile('.*<input.+?value="Publish"',\121 re.S|re.M) 122 else: 123 pattern = re.compile('.*<input\\s*class="standalone"\\s*type="submit"\\s*value="Publish This Discussion"\\s*/>',\124 re.S|re.M) 125 126 roles = [r['name'] for r in self.portal.rolesOfPermission('Moderate Discussion') if r['selected'] == 'SELECTED']127 authorized_users = [user for user in COMMON_USERS_IDS if user !='anonym']128 users_without_md_perm = [u for u in authorized_users if filter(lambda x: x not in roles, USERS[u]['roles'])]117 pattern = re.compile('.*<input.+?value="Publish"',\ 118 re.S|re.M) 119 else: 120 pattern = re.compile('.*<input\\s*class="standalone"\\s*type="submit"\\s*value="Publish This Discussion"\\s*/>',\ 121 re.S|re.M) 122 123 roles = [r['name'] for r in self.portal.rolesOfPermission('Moderate Discussion') if r['selected'] == 'SELECTED'] 124 authorized_users = [user for user in COMMON_USERS_IDS if user !='anonym'] 125 users_without_md_perm = [u for u in authorized_users if filter(lambda x: x not in roles, USERS[u]['roles'])] 129 126 for u in users_without_md_perm: 130 127 self.logout() … … 145 142 re.S|re.M) 146 143 elif self.version.startswith("2.5") or self.version.startswith('3.0'): 147 pattern = re.compile('.*<input.+?value="Publish"',\148 re.S|re.M) 149 else: 150 pattern = re.compile('.*<input\\s*class="standalone"\\s*type="submit"\\s*value="Publish"\\s*/>',\144 pattern = re.compile('.*<input.+?value="Publish"',\ 145 re.S|re.M) 146 else: 147 pattern = re.compile('.*<input\\s*class="standalone"\\s*type="submit"\\s*value="Publish"\\s*/>',\ 151 148 re.S|re.M) 152 149 for u in DM_USERS_IDS: … … 167 164 re.S|re.M) 168 165 elif self.version.startswith("2.5") or self.version.startswith('3.0'): 169 pattern = re.compile('.*<input.+?value="Publish"',\170 re.S|re.M) 171 else: 172 pattern = re.compile('.*<input\\s*class="standalone"\\s*type="submit"\\s*value="Publish This Discussion"\\s*/>',\166 pattern = re.compile('.*<input.+?value="Publish"',\ 167 re.S|re.M) 168 else: 169 pattern = re.compile('.*<input\\s*class="standalone"\\s*type="submit"\\s*value="Publish This Discussion"\\s*/>',\ 173 170 re.S|re.M) 174 171 for u in DM_USERS_IDS: … … 214 211 re.S|re.M) 215 212 elif self.version.startswith("2.5") or self.version.startswith('3.0'): 216 pattern = re.compile('.*<input\\s*class="destructive"\\s*type="submit"\\s*value="Remove"\\s*/>',\217 re.S|re.M) 218 else: 219 pattern = re.compile('.*<input\\s*class="destructive"\\s*type="submit"\\s*value="Remove"\\s*/>',\213 pattern = re.compile('.*<input\\s*class="destructive"\\s*type="submit"\\s*value="Remove"\\s*/>',\ 214 re.S|re.M) 215 else: 216 pattern = re.compile('.*<input\\s*class="destructive"\\s*type="submit"\\s*value="Remove"\\s*/>',\ 220 217 re.S|re.M) 221 218 for u in COMMON_USERS_IDS: … … 259 256 260 257 261 TESTS = [TestModeration]262 263 258 def test_suite(): 264 259 from unittest import TestSuite, makeSuite … … 266 261 suite.addTest(makeSuite(TestModeration)) 267 262 return suite 268 269 if __name__ == '__main__':270 framework()271 qPloneComments/branches/plone-3.0/tests/testQPloneCommentsNotification.py
r1018 r1126 1 # 1 # 2 2 # Test configuration form working 3 3 # 4 4 5 import os, sys, string6 7 if __name__ == '__main__':8 execfile(os.path.join(sys.path[0], 'framework.py'))9 10 5 from Products.PloneTestCase import PloneTestCase 11 6 from Products.CMFCore.utils import getToolByName 12 try: 13 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 14 except ImportError: 15 from Products.CMFCore.CMFCorePermissions import ManagePortal,ReplyToItem 16 from Products.MailHost.MailHost import MailBase 7 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 17 8 18 9 import re 19 10 from helperNotify import * 20 11 from Products.qPloneComments.utils import getMsg 21 from helperNotify import *22 12 23 13 PRODUCT = 'qPloneComments' … … 48 38 doc_fti = portal_types.getTypeInfo('Document') 49 39 doc_fti._updateProperty('allow_discussion', 1) 50 40 51 41 # Make sure Documents are visible by default 52 42 # XXX only do this for plone 3 … … 195 185 196 186 197 #def test_198 199 TESTS = [TestNotification]200 201 187 def test_suite(): 202 188 from unittest import TestSuite, makeSuite … … 204 190 suite.addTest(makeSuite(TestNotification)) 205 191 return suite 206 207 if __name__ == '__main__':208 framework()209 qPloneComments/branches/plone-3.0/tests/testQPloneCommentsNotificationRecipients.py
r1018 r1126 1 # 1 # 2 2 # Test configuration form working 3 3 # 4 4 5 import os, sys, string6 7 if __name__ == '__main__':8 execfile(os.path.join(sys.path[0], 'framework.py'))9 10 5 from Products.PloneTestCase import PloneTestCase 11 6 from Products.CMFCore.utils import getToolByName 12 try: 13 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 14 except ImportError: 15 from Products.CMFCore.CMFCorePermissions import ManagePortal,ReplyToItem 16 from Products.MailHost.MailHost import MailBase 7 from Products.CMFCore.permissions import ManagePortal, ReplyToItem 8 9 from Products.qPloneComments.utils import getMsg 17 10 18 11 import re 12 from common import * 13 from helperNotify import * 14 from testQPloneCommentsModeration import USERS, COMMON_USERS_IDS, DM_USERS_IDS 19 15 20 from Products.qPloneComments.utils import getMsg21 from testQPloneCommentsModeration import USERS, COMMON_USERS_IDS, DM_USERS_IDS22 from helperNotify import *23 from common import *24 16 25 17 PRODUCT = 'qPloneComments' … … 42 34 REXP_SUBJ = re.compile("Subject:\s*(.*?)$",re.M) 43 35 36 44 37 class TestNotificationRecipients(PloneTestCase.FunctionalTestCase): 45 38 """ Test is notifications sends to right recipients. """ … … 51 44 self.request.form['subject'] = "Reply of '%s'" % self.request.form['Creator'] 52 45 self.request.form['body_text'] = "text of reply" 53 54 46 55 47 def afterSetUp(self): … … 68 60 doc_fti = portal_types.getTypeInfo('Document') 69 61 doc_fti._updateProperty('allow_discussion', 1) 70 62 71 63 # Make sure Documents are visible by default 72 64 # XXX only do this for plone 3 … … 112 104 self.assertEqual(len(mails), 1) 113 105 self.checkToANDSubj(mails, to="discussion.manager@test.com", subj="New comment awaits moderation") 114 115 106 116 107 def test_PublishReply(self): … … 159 150 160 151 161 TESTS = [TestNotificationRecipients]162 163 152 def test_suite(): 164 153 from unittest import TestSuite, makeSuite 165 154 suite = TestSuite() 166 for t in TESTS: 167 suite.addTest(makeSuite(t)) 155 suite.addTest(makeSuite(TestNotificationRecipients)) 168 156 return suite 169 170 if __name__ == '__main__':171 framework()172 qPloneComments/branches/plone-3.0/tests/testQPloneCommentsPermission.py
r1018 r1126 3 3 # 4 4 5 import os, sys, string6 if __name__ == '__main__':7 execfile(os.path.join(sys.path[0], 'framework.py'))8 9 5 from Products.PloneTestCase import PloneTestCase 10 6 from Products.CMFCore.utils import getToolByName 11 from AccessControl import getSecurityManager 7 8 from Products.CMFDefault.DiscussionItem import DiscussionItemContainer 12 9 13 10 PRODUCT = 'qPloneComments' … … 16 13 PloneTestCase.setupPloneSite() 17 14 18 from Products.CMFDefault.DiscussionItem import DiscussionItemContainer19 15 20 16 class TestPermission(PloneTestCase.PloneTestCase): … … 23 19 self.loginAsPortalOwner() 24 20 self.portal.portal_quickinstaller.installProduct(PRODUCT) 25 21 26 22 def test_install_moderate_discussion_permission(self): 27 23 roles = [item['name'] for item in self.portal.rolesOfPermission(PERM_NAME) if item['selected'] == 'SELECTED'] … … 42 38 suite.addTest(makeSuite(TestPermission)) 43 39 return suite 44 45 if __name__ == '__main__':46 framework()47
