Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testCatalogTool.TestCatalogSetup Class Reference
Inheritance diagram for CMFPlone.tests.testCatalogTool.TestCatalogSetup:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testCatalogTool.TestCatalogSetup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testSearchableTextIsZCTextIndex
def testDescriptionIsZCTextIndex
def testTitleIsZCTextIndex
def testPloneLexiconIsZCTextLexicon
def testPathIsExtendedPathIndex
def testGetObjPositionInParentIsFieldIndex
def testGetObjSizeInSchema
def testExclude_from_navInSchema
def testIs_folderishInSchema
def testIs_folderishIsFieldIndex
def testDateIsDateIndex
def testCreatedIsDateIndex
def testEffectiveIsDateIndex
def testEndIsDateIndex
def testExpiresIsDateIndex
def testModifiedIsDateIndex
def testStartIsDateIndex
def testEffectiveRangeIsDateRangeIndex
def testSortable_TitleIsFieldIndex
def testExpirationDateInSchema
def testExpiresDateNotInSchema
def testIs_Default_PageIsFieldIndex
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 catalog

Detailed Description

Definition at line 33 of file testCatalogTool.py.


Member Function Documentation

Definition at line 35 of file testCatalogTool.py.

00035 
00036     def afterSetUp(self):
00037         self.catalog = self.portal.portal_catalog

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 92 of file testCatalogTool.py.

00092 
00093     def testCreatedIsDateIndex(self):
00094         # created should be a DateIndex
00095         self.assertEqual(self.catalog.Indexes['created'].__class__.__name__,
00096                          'DateIndex')

Definition at line 87 of file testCatalogTool.py.

00087 
00088     def testDateIsDateIndex(self):
00089         # Date should be a DateIndex
00090         self.assertEqual(self.catalog.Indexes['Date'].__class__.__name__,
00091                          'DateIndex')

Definition at line 43 of file testCatalogTool.py.

00043 
00044     def testDescriptionIsZCTextIndex(self):
00045         # Description index should be a ZCTextIndex
00046         itype = self.catalog.Indexes['Description'].__class__.__name__
00047         self.assertEqual(itype, 'ZCTextIndex')

Definition at line 97 of file testCatalogTool.py.

00097 
00098     def testEffectiveIsDateIndex(self):
00099         # effective should be a DateIndex
00100         self.assertEqual(self.catalog.Indexes['effective'].__class__.__name__,
00101                          'DateIndex')

Definition at line 122 of file testCatalogTool.py.

00122 
00123     def testEffectiveRangeIsDateRangeIndex(self):
00124         # effectiveRange should be a DateRangeIndex
00125         self.assertEqual(self.catalog.Indexes['effectiveRange'].__class__.__name__,
00126                          'DateRangeIndex')

Definition at line 102 of file testCatalogTool.py.

00102 
00103     def testEndIsDateIndex(self):
00104         # end should be a DateIndex
00105         self.assertEqual(self.catalog.Indexes['end'].__class__.__name__,
00106                          'DateIndex')

Definition at line 74 of file testCatalogTool.py.

00074 
00075     def testExclude_from_navInSchema(self):
00076         # exclude_from_nav column should be in catalog schema
00077         self.failUnless('exclude_from_nav' in self.catalog.schema())

Definition at line 132 of file testCatalogTool.py.

00132 
00133     def testExpirationDateInSchema(self):
00134         # ExpirationDate column should be in catalog schema
00135         self.failUnless('ExpirationDate' in self.catalog.schema())

Definition at line 136 of file testCatalogTool.py.

00136 
00137     def testExpiresDateNotInSchema(self):
00138         # ExpirationDate column should be in catalog schema
00139         self.failIf('ExpiresDate' in self.catalog.schema())

Definition at line 107 of file testCatalogTool.py.

00107 
00108     def testExpiresIsDateIndex(self):
00109         # expires should be a DateIndex
00110         self.assertEqual(self.catalog.Indexes['expires'].__class__.__name__,
00111                          'DateIndex')

Definition at line 64 of file testCatalogTool.py.

00064 
00065     def testGetObjPositionInParentIsFieldIndex(self):
00066         # getObjPositionInParent index should be a FieldIndex
00067         # also see TestCatalogOrdering below
00068         self.assertEqual(self.catalog.Indexes['getObjPositionInParent'].__class__.__name__,
00069                          'FieldIndex')

Definition at line 70 of file testCatalogTool.py.

00070 
00071     def testGetObjSizeInSchema(self):
00072         # getObjSize column should be in catalog schema
00073         self.failUnless('getObjSize' in self.catalog.schema())

Definition at line 140 of file testCatalogTool.py.

00140 
00141     def testIs_Default_PageIsFieldIndex(self):
00142         # sortable_title should be a FieldIndex
00143         self.assertEqual(self.catalog.Indexes['is_default_page'].__class__.__name__,
00144                          'FieldIndex')
00145 

Definition at line 78 of file testCatalogTool.py.

00078 
00079     def testIs_folderishInSchema(self):
00080         # is_folderish should be in catalog schema
00081         self.failUnless('is_folderish' in self.catalog.schema())

Definition at line 82 of file testCatalogTool.py.

00082 
00083     def testIs_folderishIsFieldIndex(self):
00084         # is_folderish should be a FieldIndex
00085         self.failUnless(self.catalog.Indexes['is_folderish'].__class__.__name__,
00086                         'FieldIndex')

Definition at line 112 of file testCatalogTool.py.

00112 
00113     def testModifiedIsDateIndex(self):
00114         # modified should be a DateIndex
00115         self.assertEqual(self.catalog.Indexes['modified'].__class__.__name__,
00116                          'DateIndex')

Definition at line 59 of file testCatalogTool.py.

00059 
00060     def testPathIsExtendedPathIndex(self):
00061         # path index should be an ExtendedPathIndex
00062         self.assertEqual(self.catalog.Indexes['path'].__class__.__name__,
00063                          'ExtendedPathIndex')

Definition at line 53 of file testCatalogTool.py.

00053 
00054     def testPloneLexiconIsZCTextLexicon(self):
00055         # Lexicon should be a ZCTextIndex lexicon
00056         self.failUnless(hasattr(aq_base(self.catalog), 'plone_lexicon'))
00057         self.assertEqual(self.catalog.plone_lexicon.meta_type,\
00058                          'ZCTextIndex Lexicon')

Definition at line 38 of file testCatalogTool.py.

00038 
00039     def testSearchableTextIsZCTextIndex(self):
00040         # SearchableText index should be a ZCTextIndex
00041         itype = self.catalog.Indexes['SearchableText'].__class__.__name__
00042         self.assertEqual(itype, 'ZCTextIndex')

Definition at line 127 of file testCatalogTool.py.

00127 
00128     def testSortable_TitleIsFieldIndex(self):
00129         # sortable_title should be a FieldIndex
00130         self.assertEqual(self.catalog.Indexes['sortable_title'].__class__.__name__,
00131                          'FieldIndex')

Definition at line 117 of file testCatalogTool.py.

00117 
00118     def testStartIsDateIndex(self):
00119         # start should be a DateIndex
00120         self.assertEqual(self.catalog.Indexes['start'].__class__.__name__,
00121                          'DateIndex')

Definition at line 48 of file testCatalogTool.py.

00048 
00049     def testTitleIsZCTextIndex(self):
00050         # Title index should be a ZCTextIndex
00051         itype = self.catalog.Indexes['Title'].__class__.__name__
00052         self.assertEqual(itype, 'ZCTextIndex')


Member Data Documentation

Definition at line 36 of file testCatalogTool.py.


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