[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Workflow/Stateful/tests - testContentWorkflowsUtility.py:1.1.2.1 testStatefulProcessDefinition.py:1.1.2.3
Florent Guillaume
fg@nuxeo.com
Fri, 6 Dec 2002 11:04:09 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Workflow/Stateful/tests
In directory cvs.zope.org:/tmp/cvs-serv6178/Stateful/tests
Modified Files:
Tag: sprintathon-wf-branch
testStatefulProcessDefinition.py
Added Files:
Tag: sprintathon-wf-branch
testContentWorkflowsUtility.py
Log Message:
Checkpoint.
Adding a beginning of entity-base workflow tool.
Tests pass, Zope starts.
=== Added File Zope3/lib/python/Zope/App/Workflow/Stateful/tests/testContentWorkflowsUtility.py ===
##############################################################################
#
# Copyright (c) 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.
#
##############################################################################
"""Test content workflows utility.
$Id: testContentWorkflowsUtility.py,v 1.1.2.1 2002/12/06 16:04:08 efge Exp $
"""
import unittest
from Interface import Interface
from Interface.Verify import verifyClass
from Zope.App.Workflow.Stateful.IContentWorkflowsUtility \
import IContentWorkflowsUtility
from Zope.App.Workflow.Stateful.ContentWorkflowsUtility \
import ContentWorkflowsUtility
class ContentWorkflowsUtilityTests(unittest.TestCase):
def setUp(self):
self.utility = ContentWorkflowsUtility()
def _testNames(self, names):
names = list(names)
names.sort()
self.utility.setProcessDefinitionNames(names)
newnames = list(self.utility.getProcessDefinitionNames())
newnames.sort()
self.assertEqual(newnames, names)
def testInterface(self):
verifyClass(IContentWorkflowsUtility, ContentWorkflowsUtility)
def testPDNames(self):
self._testNames([])
self._testNames(['abc', 'def'])
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(
ContentWorkflowsUtilityTests))
return suite
if __name__ == '__main__':
unittest.main()
=== Zope3/lib/python/Zope/App/Workflow/Stateful/tests/testStatefulProcessDefinition.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/lib/python/Zope/App/Workflow/Stateful/tests/testStatefulProcessDefinition.py:1.1.2.2 Fri Dec 6 09:05:16 2002
+++ Zope3/lib/python/Zope/App/Workflow/Stateful/tests/testStatefulProcessDefinition.py Fri Dec 6 11:04:08 2002
@@ -45,7 +45,7 @@
__implements__ = IDummyTransition
-class testStatefulProcessDefinition(unittest.TestCase):
+class StatefulProcessDefinitionTests(unittest.TestCase):
def setUp(self):
self.pd = pd = BasicStatefulProcessDefinition()