add migration test for comment Creator and nested comments.

svn path=/plone.app.discussion/trunk/; revision=27960
This commit is contained in:
Timo Stollenwerk
2009-07-12 07:09:07 +00:00
parent 88cbd01379
commit d7eaab75c8
2 changed files with 52 additions and 8 deletions
+2 -1
View File
@@ -35,7 +35,7 @@ class View(BrowserView):
dtool = context.portal_discussion
brains = catalog.searchResults(
object_provides='Products.CMFCore.interfaces._content.IContentish')
log("Found %s content object to migrate." % len(brains))
log("Found %s content objects to migrate." % len(brains))
for brain in brains:
if brain.portal_type != 'Discussion Item':
@@ -56,6 +56,7 @@ class View(BrowserView):
comment = createObject('plone.Comment')
comment.title = old_comment.Title()
comment.text = old_comment.text
comment.Creator = old_comment.Creator
conversation.addComment(comment)
log("Comment migration finished.")