remove unnecessary code from workflow test.

svn path=/plone.app.discussion/trunk/; revision=27370
This commit is contained in:
Timo Stollenwerk 2009-06-10 20:17:36 +00:00
parent 1e71258a0d
commit 9b66f62b66

View File

@ -1,12 +1,24 @@
import unittest import unittest
from zope.interface import alsoProvides
from Products.PloneTestCase.ptc import PloneTestCase from Products.PloneTestCase.ptc import PloneTestCase
from plone.app.discussion.tests.layer import DiscussionLayer from plone.app.discussion.tests.layer import DiscussionLayer
class WorkflowTest(PloneTestCase): class WorkflowTest(PloneTestCase):
layer = DiscussionLayer layer = DiscussionLayer
def afterSetUp(self):
self.portal.portal_types['Document'].allow_discussion = True
self.portal_discussion = self.portal.portal_discussion
self.folder.invokeFactory('Document', 'doc1')
self.setRoles(('Reviewer',))
#alsoProvides(self.portal.REQUEST, DiscussionLayer)
def test_permission(self): def test_permission(self):
self.setRoles(('Reviewer',)) self.setRoles(('Reviewer',))
self.failUnless(self.portal.portal_membership.checkPermission('Review comments', self.folder), self.folder) self.failUnless(self.portal.portal_membership.checkPermission('Review comments', self.folder), self.folder)