Back to index

plone3  3.1.7
Public Member Functions
plone.app.contentrules.tests.test_action_delete.TestDeleteAction Class Reference
Inheritance diagram for plone.app.contentrules.tests.test_action_delete.TestDeleteAction:
Inheritance graph
[legend]
Collaboration diagram for plone.app.contentrules.tests.test_action_delete.TestDeleteAction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testRegistered
def testInvokeAddView
def testExecute

Detailed Description

Definition at line 22 of file test_action_delete.py.


Member Function Documentation

Definition at line 24 of file test_action_delete.py.

00024 
00025     def afterSetUp(self):
00026         self.setRoles(('Manager',))
00027         self.folder.invokeFactory('Document', 'd1')

Here is the call graph for this function:

Definition at line 48 of file test_action_delete.py.

00048 
00049     def testExecute(self): 
00050         e = DeleteAction()
00051         
00052         ex = getMultiAdapter((self.folder, e, DummyEvent(self.folder.d1)), IExecutable)
00053         self.assertEquals(True, ex())
00054         
00055         self.failIf('d1' in self.folder.objectIds())
00056         
        

Here is the call graph for this function:

Definition at line 35 of file test_action_delete.py.

00035 
00036     def testInvokeAddView(self): 
00037         element = getUtility(IRuleAction, name='plone.actions.Delete')
00038         storage = getUtility(IRuleStorage)
00039         storage[u'foo'] = Rule()
00040         rule = self.portal.restrictedTraverse('++rule++foo')
00041         
00042         adding = getMultiAdapter((rule.__of__(self.portal), self.portal.REQUEST), name='+action')
00043         addview = getMultiAdapter((adding.__of__(rule), self.portal.REQUEST), name=element.addview)
00044         addview()
00045         
00046         e = rule.actions[0]
00047         self.failUnless(isinstance(e, DeleteAction))
    

Here is the call graph for this function:

Definition at line 28 of file test_action_delete.py.

00028 
00029     def testRegistered(self): 
00030         element = getUtility(IRuleAction, name='plone.actions.Delete')
00031         self.assertEquals('plone.actions.Delete', element.addview)
00032         self.assertEquals(None, element.editview)
00033         self.assertEquals(None, element.for_)
00034         self.assertEquals(IObjectEvent, element.event)
    

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