[CMF-checkins] CVS: Products/CMFCore/tests - test_WorkflowTool.py:1.10.2.1

Yvo Schubbe y.2004_ at wcm-solutions.de
Tue Nov 16 14:11:05 EST 2004


Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv16897/CMFCore/tests

Modified Files:
      Tag: CMF-1_5-branch
	test_WorkflowTool.py 
Log Message:
- fixed handling of empty string chains


=== Products/CMFCore/tests/test_WorkflowTool.py 1.10 => 1.10.2.1 ===
--- Products/CMFCore/tests/test_WorkflowTool.py:1.10	Mon Jul 26 06:13:14 2004
+++ Products/CMFCore/tests/test_WorkflowTool.py	Tue Nov 16 14:11:05 2004
@@ -227,6 +227,21 @@
         self.failUnless( 'dummy' in vars.keys() )
         self.failUnless( 'a: dummy' in vars.values() )
 
+    def test_setChainForPortalTypes(self):
+
+        tool = self._makeWithTypes()
+        dummy = DummyContent('dummy')
+
+        tool.setChainForPortalTypes( ('Dummy Content',), ('a', 'b') )
+        self.assertEquals( tool.getChainFor(dummy), ('a', 'b') )
+        tool.setChainForPortalTypes( ('Dummy Content',), 'a, b' )
+        self.assertEquals( tool.getChainFor(dummy), ('a', 'b') )
+
+        tool.setChainForPortalTypes( ('Dummy Content',), () )
+        self.assertEquals( tool.getChainFor(dummy), () )
+        tool.setChainForPortalTypes( ('Dummy Content',), '' )
+        self.assertEquals( tool.getChainFor(dummy), () )
+
     def test_getCatalogVariablesFor( self ):
 
         tool = self._makeWithTypesAndChain()



More information about the CMF-checkins mailing list