Monkey patch for clear-and-rebuild catalog added. This fixes story 847941. Nested comments are not reindexed yet.

svn path=/plone.app.discussion/trunk/; revision=30574
This commit is contained in:
Timo Stollenwerk
2009-10-14 14:58:08 +00:00
parent 83b631413a
commit 9befc4c651
3 changed files with 68 additions and 3 deletions
+6 -3
View File
@@ -230,11 +230,14 @@ class CommentCatalogTest(PloneTestCase):
self.assertEquals(self.comment_brain.in_response_to, 'doc1')
def test_clear_and_rebuild_catalog(self):
# ToDo: This test fails if clear and rebuild is run
#self.catalog.clearFindAndRebuild()
# Clear and rebuild catalog
self.catalog.clearFindAndRebuild()
# Check if comment is still there
brains = self.catalog.searchResults(portal_type = 'Discussion Item')
self.failUnless(brains)
#comment_brain = brains[0]
comment_brain = brains[0]
self.assertEquals(comment_brain.Title, 'Comment 1')
def test_suite():
return unittest.defaultTestLoader.loadTestsFromName(__name__)