add optional workflow actions to the get_replies method of the comments viewlet.

switch from Acquisition.explicit to Acquisition.implicit for the comment class.
adjust test_comment to work with Acquisition.implicit.

svn path=/plone.app.discussion/trunk/; revision=27406
This commit is contained in:
Timo Stollenwerk
2009-06-13 16:46:37 +00:00
parent 24997f4eb9
commit 8fb254f73d
6 changed files with 55 additions and 34 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ class CommentTest(PloneTestCase):
self.assertEquals('Comment 1', comment.title)
self.assertEquals(('', 'plone', 'doc1', '++conversation++default', str(new_comment1_id)), comment.getPhysicalPath())
self.assertEquals('plone/doc1/%2B%2Bconversation%2B%2Bdefault/' + str(new_comment1_id), comment.absolute_url())
self.assertEquals('http://nohost/plone/doc1/++conversation++default/' + str(new_comment1_id), comment.absolute_url())
def test_workflow(self):
self.portal.portal_workflow.setChainForPortalTypes(('Discussion Item',), ('simple_publication_workflow,'))
@@ -541,8 +541,14 @@ class ConversationTest(PloneTestCase):
# Create a conversation.
conversation = IConversation(self.portal.doc1)
# Pretend that we have traversed to the comment by aq wrapping it.
conversation = conversation.__of__(self.portal.doc1)
# Check the parent
self.failUnless(conversation.__parent__)
self.failUnless(aq_parent(conversation))
# Todo: This one is failing!
#self.failUnless(conversation.REQUEST)
self.assertEquals(conversation.__parent__.getId(), 'doc1')
def test_discussion_item_not_in_bad_types(self):