Back to index

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

List of all members.

Public Member Functions

def afterSetUp
def testRuleConditionAdding
def testRuleActionAdding

Detailed Description

Definition at line 43 of file test_rule_management_views.py.


Member Function Documentation

Definition at line 45 of file test_rule_management_views.py.

00045 
00046     def afterSetUp(self):
00047         self.setRoles(('Manager',))

Here is the call graph for this function:

Definition at line 59 of file test_rule_management_views.py.

00059 
00060     def testRuleActionAdding(self): 
00061         storage = getUtility(IRuleStorage)
00062         storage[u'foo'] = Rule()
00063         rule = self.portal.restrictedTraverse('++rule++foo')
00064         adding = getMultiAdapter((rule, self.portal.REQUEST), name='+action')
00065         d = DummyAction()
00066         self.assertEquals(0, len(rule.actions))
00067         adding.add(d)
00068         self.assertEquals(1, len(rule.actions))
00069         self.failUnless(rule.actions[0] is d)
        

Definition at line 48 of file test_rule_management_views.py.

00048 
00049     def testRuleConditionAdding(self): 
00050         storage = getUtility(IRuleStorage)
00051         storage[u'foo'] = Rule()
00052         rule = self.portal.restrictedTraverse('++rule++foo')
00053         adding = getMultiAdapter((rule, self.portal.REQUEST), name='+condition')
00054         d = DummyCondition()
00055         self.assertEquals(0, len(rule.conditions))
00056         adding.add(d)
00057         self.assertEquals(1, len(rule.conditions))
00058         self.failUnless(rule.conditions[0] is d)
        

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