Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testSetup
def testWrapper
def beforeTearDown
def test_is_folderishWithNonFolder
def test_is_folderishWithFolder
def test_is_folderishWithNonStructuralFolder
def test_provided
def test_getIcon
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 doc

Detailed Description

Tests for the wrapper

Definition at line 901 of file testCatalogTool.py.


Member Function Documentation

Definition at line 905 of file testCatalogTool.py.

00905 
00906     def afterSetUp(self):
00907         self.folder.invokeFactory('Document', 'doc', title='document')
00908         self.doc = self.folder.doc
00909         _eioRegistry.register('dummy', dummyMethod)

Definition at line 925 of file testCatalogTool.py.

00925 
00926     def beforeTearDown(self):
00927         _eioRegistry.unregister('dummy')

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 951 of file testCatalogTool.py.

00951 
00952     def test_getIcon(self):
00953         doc = self.doc
00954         iconname = doc.getIcon(relative_to_portal=1)
00955         wrapped = ExtensibleIndexableObjectWrapper(doc, self.portal)
00956         self.failUnlessEqual(wrapped.getIcon, iconname)
00957 

Here is the call graph for this function:

Definition at line 932 of file testCatalogTool.py.

00932 
00933     def test_is_folderishWithFolder(self):
00934         f = dummy.Folder('struct_folder')
00935         self.failUnless(is_folderish(f))

Definition at line 928 of file testCatalogTool.py.

00928 
00929     def test_is_folderishWithNonFolder(self):
00930         i = dummy.Item()
00931         self.failIf(is_folderish(i))

Definition at line 936 of file testCatalogTool.py.

00936 
00937     def test_is_folderishWithNonStructuralFolder(self):
00938         f = dummy.NonStructuralFolder('ns_folder')
00939         self.failIf(is_folderish(f))

Definition at line 940 of file testCatalogTool.py.

00940 
00941     def test_provided(self):
00942         from Products.CMFCore.interfaces import IContentish
00943         from Products.CMFCore.interfaces import IIndexableObjectWrapper
00944         from Products.CMFCore.tests.base.dummy import DummyContent
00945 
00946         obj = DummyContent()
00947         w = ExtensibleIndexableObjectWrapper(obj, self.portal)
00948         w.update(vars={})
00949         self.failUnless(IContentish.providedBy(w))
00950         self.failUnless(IIndexableObjectWrapper.providedBy(w))

Here is the call graph for this function:

Definition at line 910 of file testCatalogTool.py.

00910 
00911     def testSetup(self):
00912         doc = self.doc
00913         self.failUnlessEqual(doc.getId(), 'doc')
00914         self.failUnlessEqual(doc.Title(), 'document')

Definition at line 915 of file testCatalogTool.py.

00915 
00916     def testWrapper(self):
00917         doc = self.doc
00918         vars = {'var' : 'a var'}
00919         wrapped = ExtensibleIndexableObjectWrapper(doc, self.portal)
00920         wrapped.update(vars)
00921         self.failUnlessEqual(wrapped.var, 'a var')
00922         self.failUnlessEqual(wrapped.getId(), 'doc')
00923         self.failUnlessEqual(wrapped.Title(), 'document')
00924         self.failUnlessEqual(wrapped.dummy, 'a dummy')

Here is the call graph for this function:


Member Data Documentation

Definition at line 907 of file testCatalogTool.py.


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