From e42db0295ecd75af345d3ae6ae9eb274f0bb899b Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 1 Jul 2009 20:59:58 +0000 Subject: [PATCH] CatalogSetupTest added. svn path=/plone.app.discussion/trunk/; revision=27768 --- plone/app/discussion/tests/test_catalog.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plone/app/discussion/tests/test_catalog.py b/plone/app/discussion/tests/test_catalog.py index 0b98737..9772c90 100644 --- a/plone/app/discussion/tests/test_catalog.py +++ b/plone/app/discussion/tests/test_catalog.py @@ -14,6 +14,23 @@ from plone.app.discussion.tests.layer import DiscussionLayer from plone.app.discussion.interfaces import IComment, IConversation, IReplies +class CatalogSetupTest(PloneTestCase): + + layer = DiscussionLayer + + def test_catalog_installed(self): + self.failUnless('total_comments' in self.portal.portal_catalog.indexes()) + self.failUnless('commentators' in self.portal.portal_catalog.indexes()) + self.failUnless('total_comments' in self.portal.portal_catalog.schema()) + + def test_collection_criteria_installed(self): + try: + self.portal.portal_atct.getIndex('commentators') + self.portal.portal_atct.getIndex('total_comments') + self.portal.portal_atct.getMetadata('total_comments') + except AttributeError: + self.fail() + class ConversationCatalogTest(PloneTestCase): layer = DiscussionLayer