|
Revision 1126
(checked in by deo, 7 months ago)
|
Modernized tests. Untabify.
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
from Products.PloneTestCase import PloneTestCase |
|---|
| 6 |
from Products.CMFCore.utils import getToolByName |
|---|
| 7 |
|
|---|
| 8 |
from Products.CMFDefault.DiscussionItem import DiscussionItemContainer |
|---|
| 9 |
|
|---|
| 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) |
|---|
| 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 |
|
|---|
| 28 |
|
|---|
| 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 |
|---|