[CMF-checkins] CVS: CMF/CMFCore/tests - test_DirectoryView.py:1.15

Yvo Schubbe schubbe@web.de
Mon, 23 Jun 2003 08:22:13 -0400


Update of /cvs-repository/CMF/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv32338/CMFCore/tests

Modified Files:
	test_DirectoryView.py 
Log Message:
Fixed buglet in 'minimalpath()'.

=== CMF/CMFCore/tests/test_DirectoryView.py 1.14 => 1.15 ===
--- CMF/CMFCore/tests/test_DirectoryView.py:1.14	Fri Mar 14 16:12:58 2003
+++ CMF/CMFCore/tests/test_DirectoryView.py	Mon Jun 23 08:21:42 2003
@@ -1,7 +1,12 @@
-import Zope
-
 from unittest import TestCase, TestSuite, makeSuite, main
 
+import Zope
+try:
+    Zope.startup()
+except AttributeError:
+    # for Zope versions before 2.6.1
+    pass
+
 from Products.CMFCore.tests.base.dummy import DummyFolder
 from Products.CMFCore.tests.base.testcase import FSDVTest
 from Products.CMFCore.tests.base.testcase import _prefix
@@ -45,7 +50,7 @@
         self.ob.fake_skin.manage_properties('Products/CMFCore/tests/fake_skins/fake_skin')        
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
-    def test_getDirectoryInfo5( self ):
+    def test_getDirectoryInfo4( self ):
         """ *nix SOFTWARE_HOME  """
         self.ob.fake_skin.manage_properties('/usr/local/zope/2.5.1/Products/CMFCore/tests/fake_skins/fake_skin')        
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
@@ -61,6 +66,11 @@
         """ linux PRODUCTS_PATH  """
         from tempfile import mktemp        
         self.ob.fake_skin.manage_properties(mktemp()+'Products/CMFCore/tests/fake_skins/fake_skin')
+        self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
+
+    # second 'Products' in path
+    def test_getDirectoryInfo7( self ):
+        self.ob.fake_skin.manage_properties(r'C:\CoolProducts\Zope\2.5.1\Products\CMFCore\tests\fake_skins\fake_skin')        
         self.failUnless(hasattr(self.ob.fake_skin,'test1'),self.ob.fake_skin.getDirPath())
 
     # Test we do nothing if given a really wacky path