Last change
on this file since 1591 was
87,
checked in by crchemist, 18 years ago
|
killed 0.3.0 tag
|
-
Property svn:eol-style set to
native
|
File size:
1.1 KB
|
Rev | Line | |
---|
[1] | 1 | # |
---|
| 2 | # Test 'Moderate Discussion' permission |
---|
| 3 | # |
---|
| 4 | |
---|
| 5 | from Products.PloneTestCase import PloneTestCase |
---|
| 6 | from Products.CMFCore.utils import getToolByName |
---|
| 7 | |
---|
[87] | 8 | from Products.CMFDefault.DiscussionItem import DiscussionItemContainer |
---|
| 9 | |
---|
[1] | 10 | PRODUCT = 'qPloneComments' |
---|
| 11 | PERM_NAME = 'Moderate Discussion' |
---|
| 12 | PloneTestCase.installProduct(PRODUCT) |
---|
| 13 | PloneTestCase.setupPloneSite() |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | class TestPermission(PloneTestCase.PloneTestCase): |
---|
| 17 | |
---|
| 18 | def afterSetUp(self): |
---|
| 19 | self.loginAsPortalOwner() |
---|
| 20 | self.portal.portal_quickinstaller.installProduct(PRODUCT) |
---|
[87] | 21 | |
---|
[1] | 22 | def test_install_moderate_discussion_permission(self): |
---|
| 23 | roles = [item['name'] for item in self.portal.rolesOfPermission(PERM_NAME) if item['selected'] == 'SELECTED'] |
---|
| 24 | self.assert_( roles != [], '%s not installed'%PERM_NAME) |
---|
| 25 | |
---|
| 26 | def test_deleteReply_permission(self): |
---|
| 27 | #dic = DiscussionItemContainer() |
---|
| 28 | #dic.createReply('Title', 'Text') |
---|
| 29 | pass |
---|
| 30 | |
---|
| 31 | def test_manager_moderation(self): |
---|
| 32 | pass |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | def test_suite(): |
---|
| 36 | from unittest import TestSuite, makeSuite |
---|
| 37 | suite = TestSuite() |
---|
| 38 | suite.addTest(makeSuite(TestPermission)) |
---|
| 39 | return suite |
---|
Note: See
TracBrowser
for help on using the repository browser.