[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Workflow/tests - testWorkflowService.py:1.2.24.1

Florent Guillaume fg@nuxeo.com
Wed, 4 Dec 2002 04:30:25 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Workflow/tests
In directory cvs.zope.org:/tmp/cvs-serv9285

Modified Files:
      Tag: sprintathon-wf-branch
	testWorkflowService.py 
Log Message:
Dummy test for workflow service.

=== Zope3/lib/python/Zope/App/Workflow/tests/testWorkflowService.py 1.2 => 1.2.24.1 ===
--- Zope3/lib/python/Zope/App/Workflow/tests/testWorkflowService.py:1.2	Mon Jun 10 19:28:18 2002
+++ Zope3/lib/python/Zope/App/Workflow/tests/testWorkflowService.py	Wed Dec  4 04:30:24 2002
@@ -2,76 +2,43 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
-import unittest
-from Interface import Interface
 
-class engineInterface(Interface):
-    pass
-        
-class dummyEngine:
-    __implements__ = engineInterface
-
-    def listActions( self ):
-        return [0, 1, 2]
-    
-class WorkflowServiceTests( unittest.TestCase ):
-
-    def createService( self ):
-        from Zope.App.Workflow.WorkflowService import WorkflowService
-        service = WorkflowService()
-        return service
+import unittest
 
-    
-    def testInterface( self ):
-        from Zope.App.Workflow.IWorkflowService import IWorkflowService
-        from Zope.App.Workflow.WorkflowService import WorkflowService
-        from Interface.Verify import verifyClass
+from Interface import Interface
+from Interface.Verify import verifyClass
 
-        verifyClass( IWorkflowService, WorkflowService )
+from Zope.App.Workflow.IWorkflowService import IWorkflowService
+from Zope.App.Workflow.WorkflowService import WorkflowService
 
 
-    def testGetEngine( self ):
-        service = self.createService()
-        self.assertEqual(service.getEngine(engineInterface), [])
+class WorkflowServiceTests(unittest.TestCase):
 
-    def testAddEngine( self ):
-        service = self.createService()
-        engine = dummyEngine()
-        service.addEngine(engine)
-        self.assertEqual(service.getEngine(engineInterface), [engine])
+    def createService(self):
+        service = WorkflowService()
+        return service
 
+    def testInterface(self):
+        verifyClass(IWorkflowService, WorkflowService)
 
-    def testRemoveEngine( self ):
+    def testGetEngine(self):
         service = self.createService()
-        engine = dummyEngine()
-        service.addEngine(engine)
-        service.removeEngine(engine)
-        self.assertEqual(service.getEngine(engineInterface), [])
+        #self.assertEqual(service.getEngine(engineInterface), [])
 
 
-    def testListWorkflowEngineActions( self ):
-        service = self.createService()
-        engine = dummyEngine()
-        service.addEngine(engine)
-        self.assertEqual(service.listWorkflowEngineActions(),
-                         engine.listActions())
- 
-
 def test_suite():
-
     suite = unittest.TestSuite()
-    suite.addTest(
-        unittest.defaultTestLoader.loadTestsFromTestCase(
-            WorkflowServiceTests ) )
+    suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(
+        WorkflowServiceTests))
     return suite
 
 if __name__ == '__main__':