[CMF-checkins] CVS: Products/DCWorkflow/tests -
test_DCWorkflow.py:1.4.2.2
Yvo Schubbe
y.2005- at wcm-solutions.de
Wed Jun 15 06:15:01 EDT 2005
Update of /cvs-repository/Products/DCWorkflow/tests
In directory cvs.zope.org:/tmp/cvs-serv23808/DCWorkflow/tests
Modified Files:
Tag: CMF-1_5-branch
test_DCWorkflow.py
Log Message:
backported newstyle (Zope 3) interfaces from HEAD:
- added ZCML-files that bridge z2 to z3 interfaces
- added conformance tests
- fixed the Criterion interface
- added missing license headers
- cleaned up related tests a bit
=== Products/DCWorkflow/tests/test_DCWorkflow.py 1.4.2.1 => 1.4.2.2 ===
--- Products/DCWorkflow/tests/test_DCWorkflow.py:1.4.2.1 Tue Apr 26 12:02:06 2005
+++ Products/DCWorkflow/tests/test_DCWorkflow.py Wed Jun 15 06:14:31 2005
@@ -19,28 +19,41 @@
import Testing
import Zope
Zope.startup()
-from Interface.Verify import verifyClass
from Products.CMFCore.tests.base.dummy import DummyContent
from Products.CMFCore.tests.base.dummy import DummySite
from Products.CMFCore.tests.base.dummy import DummyTool
from Products.CMFCore.WorkflowTool import addWorkflowFactory
from Products.CMFCore.WorkflowTool import WorkflowTool
-from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
class DCWorkflowDefinitionTests(TestCase):
- def setUp( self ):
+ def setUp(self):
+ from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
+
self.site = DummySite('site')
self.site._setObject( 'portal_types', DummyTool() )
self.site._setObject( 'portal_workflow', WorkflowTool() )
addWorkflowFactory(DCWorkflowDefinition)
self._constructDummyWorkflow()
- def test_interface(self):
+ def test_z2interfaces(self):
+ from Interface.Verify import verifyClass
from Products.CMFCore.interfaces.portal_workflow \
import WorkflowDefinition as IWorkflowDefinition
+ from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
+
+ verifyClass(IWorkflowDefinition, DCWorkflowDefinition)
+
+ def test_z3interfaces(self):
+ try:
+ from zope.interface.verify import verifyClass
+ except ImportError:
+ # BBB: for Zope 2.7
+ return
+ from Products.CMFCore.interfaces import IWorkflowDefinition
+ from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
verifyClass(IWorkflowDefinition, DCWorkflowDefinition)
@@ -116,6 +129,7 @@
self.assert_(wf.isActionSupported(dummy, 'publish', arg1=1, arg2=2))
# XXX more tests...
+
def test_suite():
return TestSuite((
More information about the CMF-checkins
mailing list