fix tests for bugfix 834504 ("Replies have a wrong path index.")
svn path=/plone.app.discussion/trunk/; revision=27661
This commit is contained in:
parent
99b7171265
commit
768b2095de
@ -183,8 +183,8 @@ class RepliesTest(PloneTestCase):
|
|||||||
comment = createObject('plone.Comment')
|
comment = createObject('plone.Comment')
|
||||||
comment.title = 'Comment 1'
|
comment.title = 'Comment 1'
|
||||||
comment.text = 'Comment text'
|
comment.text = 'Comment text'
|
||||||
|
|
||||||
new_id = replies.addComment(comment)
|
new_id = replies.addComment(comment)
|
||||||
|
comment = self.portal.doc1.restrictedTraverse('++conversation++default/%s' % new_id)
|
||||||
|
|
||||||
# Add a reply to the CommentReplies adapter of the first comment
|
# Add a reply to the CommentReplies adapter of the first comment
|
||||||
re_comment = createObject('plone.Comment')
|
re_comment = createObject('plone.Comment')
|
||||||
@ -220,8 +220,8 @@ class RepliesTest(PloneTestCase):
|
|||||||
comment = createObject('plone.Comment')
|
comment = createObject('plone.Comment')
|
||||||
comment.title = 'Comment 1'
|
comment.title = 'Comment 1'
|
||||||
comment.text = 'Comment text'
|
comment.text = 'Comment text'
|
||||||
|
|
||||||
new_id = replies.addComment(comment)
|
new_id = replies.addComment(comment)
|
||||||
|
comment = self.portal.doc1.restrictedTraverse('++conversation++default/%s' % new_id)
|
||||||
|
|
||||||
# Add a reply to the CommentReplies adapter of the first comment
|
# Add a reply to the CommentReplies adapter of the first comment
|
||||||
re_comment = createObject('plone.Comment')
|
re_comment = createObject('plone.Comment')
|
||||||
|
@ -747,11 +747,14 @@ class RepliesTest(PloneTestCase):
|
|||||||
|
|
||||||
# Create the nested comment structure
|
# Create the nested comment structure
|
||||||
new_id_1 = replies.addComment(comment1)
|
new_id_1 = replies.addComment(comment1)
|
||||||
|
comment1 = self.portal.doc1.restrictedTraverse('++conversation++default/%s' % new_id_1)
|
||||||
replies_to_comment1 = IReplies(comment1)
|
replies_to_comment1 = IReplies(comment1)
|
||||||
new_id_2 = replies.addComment(comment2)
|
new_id_2 = replies.addComment(comment2)
|
||||||
|
comment2 = self.portal.doc1.restrictedTraverse('++conversation++default/%s' % new_id_2)
|
||||||
replies_to_comment2 = IReplies(comment2)
|
replies_to_comment2 = IReplies(comment2)
|
||||||
|
|
||||||
new_id_1_1 = replies_to_comment1.addComment(comment1_1)
|
new_id_1_1 = replies_to_comment1.addComment(comment1_1)
|
||||||
|
comment1_1 = self.portal.doc1.restrictedTraverse('++conversation++default/%s' % new_id_1_1)
|
||||||
replies_to_comment1_1 = IReplies(comment1_1)
|
replies_to_comment1_1 = IReplies(comment1_1)
|
||||||
new_id_1_1_1 = replies_to_comment1_1.addComment(comment1_1_1)
|
new_id_1_1_1 = replies_to_comment1_1.addComment(comment1_1_1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user