Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFCore.tests.test_PortalContent.PortalContentTests Class Reference

List of all members.

Public Member Functions

def tearDown
def test_z2interfaces
def test_z3interfaces
def test_DoubleDefaultAlias
def test_BlankDefaultAlias
def test_SpecificAlias

Private Member Functions

def _setupCallTests

Detailed Description

Definition at line 36 of file test_PortalContent.py.


Member Function Documentation

Definition at line 61 of file test_PortalContent.py.

00061 
00062     def _setupCallTests(self, aliases):
00063         # root
00064         root = Folder( 'root' )
00065 
00066         # set up dummy type info with problematic double-default alias
00067         root._setObject( 'portal_types', DummyTool() )
00068         root.portal_types._type_actions = aliases
00069 
00070         # dummy content and skin
00071         root._setObject( 'dummycontent', DummyContent() )
00072         root._setObject( 'dummy_view', DummyObject() )
00073         return root.dummycontent

Here is the caller graph for this function:

Definition at line 38 of file test_PortalContent.py.

00038 
00039     def tearDown(self):
00040         cleanUp()

Here is the call graph for this function:

Definition at line 82 of file test_PortalContent.py.

00082 
00083     def test_BlankDefaultAlias(self):
00084         test_aliases = ( ('(Default)', ''),
00085                          ('view', 'dummy_view'),
00086                        )
00087         ob = self._setupCallTests(test_aliases)
00088         # blank values are not valid
00089         self.assertRaises(NotFound, ob)

Here is the call graph for this function:

Definition at line 74 of file test_PortalContent.py.

00074 
00075     def test_DoubleDefaultAlias(self):
00076         test_aliases = ( ('(Default)', '(Default)'),
00077                          ('view', 'dummy_view'),
00078                        )
00079         ob = self._setupCallTests(test_aliases)
00080         # PortalContent no longer supports the BBB '(Default)' alias
00081         self.assertRaises(NotFound, ob)

Here is the call graph for this function:

Definition at line 90 of file test_PortalContent.py.

00090 
00091     def test_SpecificAlias(self):
00092         test_aliases = ( ('(Default)', 'dummy_view'),
00093                        )
00094         ob = self._setupCallTests(test_aliases)
00095         self.assertEqual( ob(), 'dummy' )
00096 

Here is the call graph for this function:

Definition at line 41 of file test_PortalContent.py.

00041 
00042     def test_z2interfaces(self):
00043         from Interface.Verify import verifyClass
00044         from Products.CMFCore.interfaces.Contentish \
00045                 import Contentish as IContentish
00046         from Products.CMFCore.interfaces.Dynamic \
00047                 import DynamicType as IDynamicType
00048         from Products.CMFCore.PortalContent import PortalContent
00049 
00050         verifyClass(IContentish, PortalContent)
00051         verifyClass(IDynamicType, PortalContent)

Definition at line 52 of file test_PortalContent.py.

00052 
00053     def test_z3interfaces(self):
00054         from zope.interface.verify import verifyClass
00055         from Products.CMFCore.interfaces import IContentish
00056         from Products.CMFCore.interfaces import IDynamicType
00057         from Products.CMFCore.PortalContent import PortalContent
00058 
00059         verifyClass(IContentish, PortalContent)
00060         verifyClass(IDynamicType, PortalContent)


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