Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Products.DCWorkflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Products.DCWorkflow
Commits
b1b8a205
Commit
b1b8a205
authored
Sep 23, 2011
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- converted one more tool
parent
4f787f3c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
Products/DCWorkflow/DCWorkflow.py
Products/DCWorkflow/DCWorkflow.py
+0
-3
Products/DCWorkflow/tests/test_DCWorkflow.py
Products/DCWorkflow/tests/test_DCWorkflow.py
+4
-2
Products/DCWorkflow/tests/test_guard.py
Products/DCWorkflow/tests/test_guard.py
+4
-2
No files found.
Products/DCWorkflow/DCWorkflow.py
View file @
b1b8a205
...
@@ -11,8 +11,6 @@
...
@@ -11,8 +11,6 @@
#
#
##############################################################################
##############################################################################
""" Web-configurable workflow.
""" Web-configurable workflow.
$Id$
"""
"""
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
...
@@ -28,7 +26,6 @@ from zope.event import notify
...
@@ -28,7 +26,6 @@ from zope.event import notify
from
zope.interface
import
implements
from
zope.interface
import
implements
from
Products.CMFCore.interfaces
import
IWorkflowDefinition
from
Products.CMFCore.interfaces
import
IWorkflowDefinition
from
Products.CMFCore.utils
import
getToolByName
from
Products.CMFCore.WorkflowCore
import
ObjectDeleted
from
Products.CMFCore.WorkflowCore
import
ObjectDeleted
from
Products.CMFCore.WorkflowCore
import
ObjectMoved
from
Products.CMFCore.WorkflowCore
import
ObjectMoved
from
Products.CMFCore.WorkflowCore
import
WorkflowException
from
Products.CMFCore.WorkflowCore
import
WorkflowException
...
...
Products/DCWorkflow/tests/test_DCWorkflow.py
View file @
b1b8a205
...
@@ -23,6 +23,7 @@ from zope.component import getSiteManager
...
@@ -23,6 +23,7 @@ from zope.component import getSiteManager
from
zope.component
import
provideHandler
from
zope.component
import
provideHandler
from
zope.interface.verify
import
verifyClass
from
zope.interface.verify
import
verifyClass
from
Products.CMFCore.interfaces
import
ITypesTool
from
Products.CMFCore.interfaces
import
IWorkflowTool
from
Products.CMFCore.interfaces
import
IWorkflowTool
from
Products.CMFCore.testing
import
TraversingEventZCMLLayer
from
Products.CMFCore.testing
import
TraversingEventZCMLLayer
from
Products.CMFCore.tests.base.dummy
import
DummyContent
from
Products.CMFCore.tests.base.dummy
import
DummyContent
...
@@ -43,12 +44,13 @@ class DCWorkflowDefinitionTests(SecurityTest):
...
@@ -43,12 +44,13 @@ class DCWorkflowDefinitionTests(SecurityTest):
SecurityTest
.
setUp
(
self
)
SecurityTest
.
setUp
(
self
)
self
.
app
.
_setObject
(
'site'
,
DummySite
(
'site'
))
self
.
app
.
_setObject
(
'site'
,
DummySite
(
'site'
))
self
.
site
=
self
.
app
.
_getOb
(
'site'
)
self
.
site
=
self
.
app
.
_getOb
(
'site'
)
self
.
site
.
_setObject
(
'portal_types'
,
DummyTool
())
self
.
wtool
=
self
.
site
.
_setObject
(
'portal_workflow'
,
WorkflowTool
())
self
.
wtool
=
self
.
site
.
_setObject
(
'portal_workflow'
,
WorkflowTool
())
getSiteManager
().
registerUtility
(
self
.
wtool
,
IWorkflowTool
)
self
.
_constructDummyWorkflow
()
self
.
_constructDummyWorkflow
()
transaction
.
savepoint
(
optimistic
=
True
)
transaction
.
savepoint
(
optimistic
=
True
)
newSecurityManager
(
None
,
OmnipotentUser
().
__of__
(
self
.
site
))
newSecurityManager
(
None
,
OmnipotentUser
().
__of__
(
self
.
site
))
sm
=
getSiteManager
()
sm
.
registerUtility
(
self
.
wtool
,
IWorkflowTool
)
sm
.
registerUtility
(
DummyTool
(),
ITypesTool
)
def
test_interfaces
(
self
):
def
test_interfaces
(
self
):
from
Products.CMFCore.interfaces
import
IWorkflowDefinition
from
Products.CMFCore.interfaces
import
IWorkflowDefinition
...
...
Products/DCWorkflow/tests/test_guard.py
View file @
b1b8a205
...
@@ -20,6 +20,7 @@ from AccessControl import getSecurityManager
...
@@ -20,6 +20,7 @@ from AccessControl import getSecurityManager
from
zope.component
import
getSiteManager
from
zope.component
import
getSiteManager
from
zope.testing.cleanup
import
cleanUp
from
zope.testing.cleanup
import
cleanUp
from
Products.CMFCore.interfaces
import
ITypesTool
from
Products.CMFCore.interfaces
import
IWorkflowTool
from
Products.CMFCore.interfaces
import
IWorkflowTool
from
Products.CMFCore.tests.base.dummy
import
DummyContent
from
Products.CMFCore.tests.base.dummy
import
DummyContent
from
Products.CMFCore.tests.base.dummy
import
DummySite
from
Products.CMFCore.tests.base.dummy
import
DummySite
...
@@ -33,13 +34,14 @@ class TestGuard(unittest.TestCase):
...
@@ -33,13 +34,14 @@ class TestGuard(unittest.TestCase):
def
setUp
(
self
):
def
setUp
(
self
):
self
.
site
=
DummySite
(
'site'
)
self
.
site
=
DummySite
(
'site'
)
self
.
site
.
_setObject
(
'portal_types'
,
DummyTool
())
# Construct a workflow
# Construct a workflow
self
.
wtool
=
WorkflowTool
()
self
.
wtool
=
WorkflowTool
()
self
.
wtool
.
_setObject
(
'wf'
,
DCWorkflowDefinition
(
'wf'
))
self
.
wtool
.
_setObject
(
'wf'
,
DCWorkflowDefinition
(
'wf'
))
self
.
wtool
.
setDefaultChain
(
'wf'
)
self
.
wtool
.
setDefaultChain
(
'wf'
)
getSiteManager
().
registerUtility
(
self
.
wtool
,
IWorkflowTool
)
sm
=
getSiteManager
()
sm
.
registerUtility
(
self
.
wtool
,
IWorkflowTool
)
sm
.
registerUtility
(
DummyTool
(),
ITypesTool
)
def
tearDown
(
self
):
def
tearDown
(
self
):
cleanUp
()
cleanUp
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment