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

Jim Fulton jim@zope.com
Sun, 1 Jun 2003 12:00:10 -0400


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

Modified Files:
	test_instance.py 
Log Message:
Moved ContextWrapper, getItem, getAttr, queryItem, and queryAttr
from zope.context to zope.app.context.


=== Zope3/src/zope/app/workflow/stateful/tests/test_instance.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/workflow/stateful/tests/test_instance.py:1.2	Tue May 27 10:18:29 2003
+++ Zope3/src/zope/app/workflow/stateful/tests/test_instance.py	Sun Jun  1 11:59:39 2003
@@ -32,7 +32,7 @@
 from zope.security.management import newSecurityManager
 from zope.security.management import system_user
 
-from zope.context import ContextWrapper
+from zope.app.context import ContextWrapper
 from zope.app.traversing import traverse
 
 from zope.app.container.zopecontainer import ZopeContainerAdapter
@@ -110,8 +110,9 @@
 
         self.pd = self.service.getProcessDefinition('definition1')
         # give the pi some context to find a service
-        self.pi = ContextWrapper(self.service.createProcessInstance('definition1'),
-                                 self.rootFolder)
+        self.pi = ContextWrapper(
+            self.service.createProcessInstance('definition1'),
+            self.rootFolder)
 
 
     def testInterface(self):
@@ -187,12 +188,14 @@
         pd.transitions.setObject('initial_state2',
                                  Transition('INITIAL', 'state2',
                                             condition='not: data/value'))
-        pd.transitions.setObject('state1_state2',
-                                 Transition('state1', 'state2',
-                                            condition='python: data.text == "some text"'))
-        pd.transitions.setObject('state2_state1',
-                                 Transition('state2', 'state1',
-                                            condition='python: data.text == "no text"'))
+        pd.transitions.setObject(
+            'state1_state2',
+            Transition('state1', 'state2',
+                       condition='python: data.text == "some text"'))
+        pd.transitions.setObject(
+            'state2_state1',
+            Transition('state2', 'state1',
+                       condition='python: data.text == "no text"'))
         pd.transitions.setObject('state1_initial',
                                  Transition('state1', 'INITIAL'))
         pd.transitions.setObject('state2_initial',
@@ -206,8 +209,9 @@
 
         self.pd = self.service.getProcessDefinition('definition1')
         # give the pi some context to find a service
-        self.pi = ContextWrapper(self.service.createProcessInstance('definition1'),
-                                 self.rootFolder)
+        self.pi = ContextWrapper(
+            self.service.createProcessInstance('definition1'),
+            self.rootFolder)
 
 
 
@@ -279,9 +283,10 @@
         pd.transitions.setObject('initial_state1',
                                  Transition('INITIAL', 'state1',
                                             script=lambda c: c['data'].value))
-        pd.transitions.setObject('initial_state2',
-                                 Transition('INITIAL', 'state2',
-                                            script=lambda c: not c['data'].value))
+        pd.transitions.setObject(
+            'initial_state2',
+            Transition('INITIAL', 'state2',
+                       script=lambda c: not c['data'].value))
         pd.transitions.setObject('state1_state2',
                                  Transition('state1', 'state2',
                                             script=transition_script1))
@@ -301,8 +306,9 @@
 
         self.pd = self.service.getProcessDefinition('definition1')
         # give the pi some context to find a service
-        self.pi = ContextWrapper(self.service.createProcessInstance('definition1'),
-                                 self.rootFolder)
+        self.pi = ContextWrapper(
+            self.service.createProcessInstance('definition1'),
+            self.rootFolder)
 
 
 
@@ -371,17 +377,22 @@
         pd.states.setObject('state2', State())
         
         pd.transitions.setObject('initial_state1',
-                                 Transition('INITIAL', 'state1', permission=CheckerPublic))
+                                 Transition('INITIAL', 'state1',
+                                            permission=CheckerPublic))
         pd.transitions.setObject('initial_state2',
-                                 Transition('INITIAL', 'state2', permission='deny'))
+                                 Transition('INITIAL', 'state2',
+                                            permission='deny'))
         pd.transitions.setObject('state1_state2',
-                                 Transition('state1', 'state2', permission=CheckerPublic))
+                                 Transition('state1', 'state2',
+                                            permission=CheckerPublic))
         pd.transitions.setObject('state2_state1',
                                  Transition('state2', 'state1'))
         pd.transitions.setObject('state1_initial',
-                                 Transition('state1', 'INITIAL', permission='deny'))
+                                 Transition('state1', 'INITIAL',
+                                            permission='deny'))
         pd.transitions.setObject('state2_initial',
-                                 Transition('state2', 'INITIAL', permission=CheckerPublic))
+                                 Transition('state2', 'INITIAL',
+                                            permission=CheckerPublic))
 
         self.default.setObject('pd1', pd )
 
@@ -391,8 +402,9 @@
 
         self.pd = self.service.getProcessDefinition('definition1')
         # give the pi some context to find a service
-        self.pi = ContextWrapper(self.service.createProcessInstance('definition1'),
-                                 self.rootFolder)
+        self.pi = ContextWrapper(
+            self.service.createProcessInstance('definition1'),
+            self.rootFolder)