Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testRuleAdding
def testRuleAddView
def testRuleEditView

Detailed Description

Definition at line 15 of file test_rule_management_views.py.


Member Function Documentation

Definition at line 17 of file test_rule_management_views.py.

00017 
00018     def afterSetUp(self):
00019         self.setRoles(('Manager',))

Here is the call graph for this function:

Definition at line 20 of file test_rule_management_views.py.

00020 
00021     def testRuleAdding(self): 
00022         adding = getMultiAdapter((self.portal, self.portal.REQUEST), name='+rule')
00023         storage = getUtility(IRuleStorage)
00024         self.assertEquals(0, len(storage))
00025         r = Rule()
00026         adding.add(r)
00027         self.assertEquals(1, len(storage))
00028         self.failUnless(storage.values()[0] is r)

Here is the call graph for this function:

Definition at line 29 of file test_rule_management_views.py.

00029 
00030     def testRuleAddView(self): 
00031         adding = getMultiAdapter((self.portal, self.portal.REQUEST), name='+rule')
00032         addview = getMultiAdapter((adding, self.portal.REQUEST), name='plone.ContentRule')
00033         storage = getUtility(IRuleStorage)
00034         self.assertEquals(0, len(storage))
00035         addview.createAndAdd({'title' : 'foo', 'description' : 'bar', 'event' : None})
00036         self.assertEquals(1, len(storage))
00037         self.assertEquals('foo', storage.values()[0].title)
        

Here is the call graph for this function:

Definition at line 38 of file test_rule_management_views.py.

00038 
00039     def testRuleEditView(self): 
00040         r = Rule()
00041         editview = getMultiAdapter((r, self.portal.REQUEST), name='edit')
00042         self.failUnless(isinstance(editview, RuleEditForm))


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