[Zope3-checkins] CVS: Zope3/src/zope/app/workflow/stateful/tests - test_contentworkflow.py:1.8

Jim Fulton jim at zope.com
Sun Sep 21 13:33:59 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/workflow/stateful/tests
In directory cvs.zope.org:/tmp/cvs-serv15740/src/zope/app/workflow/stateful/tests

Modified Files:
	test_contentworkflow.py 
Log Message:
Changed to use __setitem__ rather than setObject

Use helper function to add registrations.


=== Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py:1.7	Sun Aug 17 02:08:41 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_contentworkflow.py	Sun Sep 21 13:33:59 2003
@@ -84,7 +84,7 @@
     def getManager(self):
         manager = ContentWorkflowsManager()
         manager._registry = {IFace1: ('default',), IFace2: ('default',)}
-        self.default.setObject('manager', manager)
+        self.default['manager'] = manager
         return zapi.traverse(self.default, 'manager')
 
     def test_subscribe(self):
@@ -159,15 +159,17 @@
 
     def test_notify(self):
         # setup ProcessDefinitions
-        self.default.setObject('pd1', DummyProcessDefinition(1))
-        self.default.setObject('pd2', DummyProcessDefinition(2))
+        self.default['pd1'] = DummyProcessDefinition(1)
+        self.default['pd2'] = DummyProcessDefinition(2)
 
-        id = self.cm.setObject('', ProcessDefinitionRegistration('definition1',
-                                '/++etc++site/default/pd1'))
+        id = self.cm.addRegistration(
+            ProcessDefinitionRegistration('definition1',
+                                          '/++etc++site/default/pd1'))
         zapi.traverse(self.default.getRegistrationManager(),
                       id).status = ActiveStatus
-        id = self.cm.setObject('', ProcessDefinitionRegistration('definition2',
-                                '/++etc++site/default/pd2'))
+        id = self.cm.addRegistration(
+            ProcessDefinitionRegistration('definition2',
+                                          '/++etc++site/default/pd2'))
         zapi.traverse(self.default.getRegistrationManager(),
                       id).status = ActiveStatus
         manager = self.getManager()




More information about the Zope3-Checkins mailing list