failing test for Pivotal Tracker issue #2494228 added (comment out test for now).
svn path=/plone.app.discussion/trunk/; revision=34915
This commit is contained in:
parent
03516d3aad
commit
6e226be248
@ -143,6 +143,24 @@ class ConversationTest(PloneTestCase):
|
|||||||
{'comment': comment2_1, 'depth': 1, 'id': new_id_2_1},
|
{'comment': comment2_1, 'depth': 1, 'id': new_id_2_1},
|
||||||
], list(conversation.getThreads()))
|
], list(conversation.getThreads()))
|
||||||
|
|
||||||
|
def test_delete_comment_when_content_object_is_deleted(self):
|
||||||
|
# Make sure all comments of a content object are deleted when the object
|
||||||
|
# itself is deleted.
|
||||||
|
conversation = IConversation(self.portal.doc1)
|
||||||
|
comment = createObject('plone.Comment')
|
||||||
|
comment.title = 'Comment 1'
|
||||||
|
comment.text = 'Comment text'
|
||||||
|
new_id = conversation.addComment(comment)
|
||||||
|
|
||||||
|
# Delete the content object
|
||||||
|
self.portal.manage_delObjects(['doc1'])
|
||||||
|
|
||||||
|
# Make sure the comment has been deleted as well
|
||||||
|
# XXX: Failing! Pivotal Tracker issue #2494228.
|
||||||
|
#self.assertEquals(len(list(conversation.getComments())), 0)
|
||||||
|
#self.assertEquals(sum(1 for w in conversation.getThreads()), 0)
|
||||||
|
#self.assertEquals(conversation.total_comments, 0)
|
||||||
|
|
||||||
def test_allow_discussion(self):
|
def test_allow_discussion(self):
|
||||||
# This is not a real test! It's only there to understand the
|
# This is not a real test! It's only there to understand the
|
||||||
# allow discussion attribute. Maybe we should remove this at
|
# allow discussion attribute. Maybe we should remove this at
|
||||||
|
Loading…
Reference in New Issue
Block a user