source: products/qPloneComments/tags/3.2.2/tests/testQPloneCommentsPermission.py @ 1591

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
Line 
1#
2# Test 'Moderate Discussion' permission
3#
4
5from Products.PloneTestCase import PloneTestCase
6from Products.CMFCore.utils import getToolByName
7
8from Products.CMFDefault.DiscussionItem import DiscussionItemContainer
9
10PRODUCT = 'qPloneComments'
11PERM_NAME = 'Moderate Discussion'
12PloneTestCase.installProduct(PRODUCT)
13PloneTestCase.setupPloneSite()
14
15
16class TestPermission(PloneTestCase.PloneTestCase):
17
18    def afterSetUp(self):
19        self.loginAsPortalOwner()
20        self.portal.portal_quickinstaller.installProduct(PRODUCT)
21
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
35def 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.