Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ATContentTypes.tests.test_criteria.TestCriterionRegistry Class Reference
Inheritance diagram for ATContentTypes.tests.test_criteria.TestCriterionRegistry:
Inheritance graph
Collaboration diagram for ATContentTypes.tests.test_criteria.TestCriterionRegistry:
Collaboration graph

List of all members.

Public Member Functions

def afterSetUp
def testRegisterCriteria
def testCriteriaIndexLookupOnBadIndex

Public Attributes


Detailed Description

Definition at line 711 of file

Member Function Documentation

Definition at line 713 of file

00714     def afterSetUp(self):
00715         from Products.ATContentTypes.criteria import _criterionRegistry
00716         atcttestcase.ATCTSiteTestCase.afterSetUp(self)
00717         self.crit_registry = _criterionRegistry

Definition at line 733 of file

00734     def testCriteriaIndexLookupOnBadIndex(self):
00735         # Make sure we don't throw errors when someone has a non-default index
00736         # type in their catalog.
00737         self.crit_registry.criteriaByIndex('My Bad Index Type')
00739 tests.append(TestCriterionRegistry)

Definition at line 718 of file

00719     def testRegisterCriteria(self):
00720         # Ensure that the criteria registering and unregistering mechanism
00721         # works as expected
00722         # check if the expected criteria is there
00723         self.failUnless(ATDateCriteria in self.crit_registry.listCriteria())
00724         self.failUnless(self.crit_registry.indicesByCriterion('ATFriendlyDateCriteria'))
00725         # remove and ensure that it was removed
00726         self.crit_registry.unregister(ATDateCriteria)
00727         self.failIf(ATDateCriteria in self.crit_registry.listCriteria())
00728         # add and ensure that it was added
00729         self.crit_registry.register(ATDateCriteria, ('Bogus Index',))
00730         self.failUnless(ATDateCriteria in self.crit_registry.listCriteria())
00731         self.assertEqual(self.crit_registry.indicesByCriterion('ATFriendlyDateCriteria'),
00732                                                         ('Bogus Index',))

Member Data Documentation

Definition at line 716 of file

The documentation for this class was generated from the following file: