Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFCore.tests.test_CatalogTool.IndexableObjectWrapperTests Class Reference

List of all members.

Public Member Functions

def test_z2interfaces
def test_z3interfaces
def test_allowedRolesAndUsers
def test___str__
def test_proxied_attributes
def test_vars
def test_provided

Private Member Functions

def _getTargetClass
def _makeOne

Detailed Description

Definition at line 31 of file test_CatalogTool.py.


Member Function Documentation

Definition at line 33 of file test_CatalogTool.py.

00033 
00034     def _getTargetClass(self):
00035         from Products.CMFCore.CatalogTool import IndexableObjectWrapper
00036 
00037         return IndexableObjectWrapper

def CMFCore.tests.test_CatalogTool.IndexableObjectWrapperTests._makeOne (   self,
  args,
  kw 
) [private]

Definition at line 38 of file test_CatalogTool.py.

00038 
00039     def _makeOne(self, *args, **kw):
00040         return self._getTargetClass()(*args, **kw)

Here is the call graph for this function:

Definition at line 62 of file test_CatalogTool.py.

00062 
00063     def test___str__(self):
00064         obj = DummyContent('foo')
00065         w = self._makeOne({}, obj)
00066         self.assertEqual(str(w), str(obj))

Here is the call graph for this function:

Definition at line 54 of file test_CatalogTool.py.

00054 
00055     def test_allowedRolesAndUsers(self):
00056         # XXX This test fails when verbose security is enabled in zope.conf,
00057         # because the roles will then contain '_View_Permission' as well as
00058         # 'Manager'.
00059         obj = DummyContent()
00060         w = self._makeOne({}, obj)
00061         self.assertEqual(w.allowedRolesAndUsers(), ['Manager'])

Here is the call graph for this function:

Definition at line 80 of file test_CatalogTool.py.

00080 
00081     def test_provided(self):
00082         from Products.CMFCore.interfaces import IContentish
00083         from Products.CMFCore.interfaces import IIndexableObjectWrapper
00084 
00085         obj = DummyContent()
00086         w = self._makeOne({}, obj)
00087         self.failUnless(IContentish.providedBy(w))
00088         self.failUnless(IIndexableObjectWrapper.providedBy(w))
00089 

Here is the call graph for this function:

Definition at line 67 of file test_CatalogTool.py.

00067 
00068     def test_proxied_attributes(self):
00069         obj = DummyContent('foo')
00070         obj.title = 'Foo'
00071         w = self._makeOne({}, obj)
00072         self.assertEqual(w.getId(), 'foo')
00073         self.assertEqual(w.Title(), 'Foo')

Here is the call graph for this function:

Definition at line 74 of file test_CatalogTool.py.

00074 
00075     def test_vars(self):
00076         obj = DummyContent()
00077         w = self._makeOne({'bar': 1, 'baz': 2}, obj)
00078         self.assertEqual(w.bar, 1)
00079         self.assertEqual(w.baz, 2)

Here is the call graph for this function:

Definition at line 41 of file test_CatalogTool.py.

00041 
00042     def test_z2interfaces(self):
00043         from Interface.Verify import verifyClass
00044         from Products.CMFCore.interfaces.portal_catalog \
00045                 import IndexableObjectWrapper as IIndexableObjectWrapper
00046 
00047         verifyClass(IIndexableObjectWrapper, self._getTargetClass())

Here is the call graph for this function:

Definition at line 48 of file test_CatalogTool.py.

00048 
00049     def test_z3interfaces(self):
00050         from zope.interface.verify import verifyClass
00051         from Products.CMFCore.interfaces import IIndexableObjectWrapper
00052 
00053         verifyClass(IIndexableObjectWrapper, self._getTargetClass())

Here is the call graph for this function:


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