Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFCore.tests.test_ActionInformation.ActionInfoTests Class Reference

List of all members.

Public Member Functions

def test_z2interfaces
def test_z3interfaces
def test_create_from_Action
def test_create_from_ActionInformation
def test_create_from_dict

Private Member Functions

def _makeOne

Detailed Description

Definition at line 132 of file test_ActionInformation.py.


Member Function Documentation

def CMFCore.tests.test_ActionInformation.ActionInfoTests._makeOne (   self,
  args,
  kw 
) [private]

Definition at line 134 of file test_ActionInformation.py.

00134 
00135     def _makeOne(self, *args, **kw):
00136         from Products.CMFCore.ActionInformation import ActionInfo
00137 
00138         return ActionInfo(*args, **kw)

Definition at line 154 of file test_ActionInformation.py.

00154 
00155     def test_create_from_Action(self):
00156         from Products.CMFCore.ActionInformation import Action
00157 
00158         WANTED = {'allowed': True, 'available': True, 'category': '',
00159                   'description': '', 'icon': '', 'id': 'foo', 'title': '',
00160                   'url': '', 'visible': True}
00161 
00162         action = Action(id='foo')
00163         ec = None
00164         ai = self._makeOne(action, ec)
00165 
00166         self.assertEqual( ai['id'], WANTED['id'] )
00167         self.assertEqual( ai['title'], WANTED['title'] )
00168         self.assertEqual( ai['description'], WANTED['description'] )
00169         self.assertEqual( ai['url'], WANTED['url'] )
00170         self.assertEqual( ai['category'], WANTED['category'] )
00171         self.assertEqual( ai['visible'], WANTED['visible'] )
00172         self.assertEqual( ai['available'], WANTED['available'] )
00173         self.assertEqual( ai['allowed'], WANTED['allowed'] )
00174         self.assertEqual( ai, WANTED )

Here is the call graph for this function:

Definition at line 175 of file test_ActionInformation.py.

00175 
00176     def test_create_from_ActionInformation(self):
00177         from Products.CMFCore.ActionInformation import ActionInformation
00178 
00179         WANTED = {'allowed': True, 'available': True, 'category': 'object',
00180                   'description': '', 'id': 'foo', 'title': 'foo', 'url': '',
00181                   'visible': True}
00182 
00183         action = ActionInformation(id='foo')
00184         ec = None
00185         ai = self._makeOne(action, ec)
00186 
00187         self.assertEqual( ai['id'], WANTED['id'] )
00188         self.assertEqual( ai['title'], WANTED['title'] )
00189         self.assertEqual( ai['description'], WANTED['description'] )
00190         self.assertEqual( ai['url'], WANTED['url'] )
00191         self.assertEqual( ai['category'], WANTED['category'] )
00192         self.assertEqual( ai['visible'], WANTED['visible'] )
00193         self.assertEqual( ai['available'], WANTED['available'] )
00194         self.assertEqual( ai['allowed'], WANTED['allowed'] )
00195         self.assertEqual( ai, WANTED )

Here is the call graph for this function:

Definition at line 196 of file test_ActionInformation.py.

00196 
00197     def test_create_from_dict(self):
00198         WANTED = {'allowed': True, 'available': True, 'category': 'object',
00199                   'id': 'foo', 'title': 'foo', 'url': '', 'visible': True}
00200 
00201         action = {'name': 'foo', 'url': ''}
00202         ec = None
00203         ai = self._makeOne(action, ec)
00204 
00205         self.assertEqual( ai['id'], WANTED['id'] )
00206         self.assertEqual( ai['title'], WANTED['title'] )
00207         self.assertEqual( ai['url'], WANTED['url'] )
00208         self.assertEqual( ai['category'], WANTED['category'] )
00209         self.assertEqual( ai['visible'], WANTED['visible'] )
00210         self.assertEqual( ai['available'], WANTED['available'] )
00211         self.assertEqual( ai['allowed'], WANTED['allowed'] )
00212         self.assertEqual( ai, WANTED )
00213 

Here is the call graph for this function:

Definition at line 139 of file test_ActionInformation.py.

00139 
00140     def test_z2interfaces(self):
00141         from Interface.Verify import verifyClass
00142         from Products.CMFCore.ActionInformation import ActionInfo
00143         from Products.CMFCore.interfaces.portal_actions \
00144                 import ActionInfo as IActionInfo
00145 
00146         verifyClass(IActionInfo, ActionInfo)

Definition at line 147 of file test_ActionInformation.py.

00147 
00148     def test_z3interfaces(self):
00149         from zope.interface.verify import verifyClass
00150         from Products.CMFCore.ActionInformation import ActionInfo
00151         from Products.CMFCore.interfaces import IActionInfo
00152 
00153         verifyClass(IActionInfo, ActionInfo)


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