[CMF-checkins] SVN: CMF/branches/CMF-1_5-branch/C - made sure we have a writable copy and can delete it (http://www.zope.org/Collectors/CMF/106)

Yvo Schubbe y.2005- at wcm-solutions.de
Tue Jul 19 07:07:34 EDT 2005


Log message for revision 37328:
  - made sure we have a writable copy and can delete it (http://www.zope.org/Collectors/CMF/106)
  - added missing tearDown call

Changed:
  U   CMF/branches/CMF-1_5-branch/CHANGES.txt
  U   CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py
  U   CMF/branches/CMF-1_5-branch/CMFCore/tests/test_FSZSQLMethod.py

-=-
Modified: CMF/branches/CMF-1_5-branch/CHANGES.txt
===================================================================
--- CMF/branches/CMF-1_5-branch/CHANGES.txt	2005-07-18 21:10:18 UTC (rev 37327)
+++ CMF/branches/CMF-1_5-branch/CHANGES.txt	2005-07-19 11:07:04 UTC (rev 37328)
@@ -2,6 +2,9 @@
 
 Bugs Fixed
 
+    - Made sure FSDVTest always deletes its temporary folder on tearDown.
+      (http://www.zope.org/Collectors/CMF/106)
+
     - Fix DefaultWorkflowDefinition bug on isActionSupported() for the
       keywargs support to reflect DCWorkflowDefinition changes. Add a
       test case for this definition as well.

Modified: CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py
===================================================================
--- CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py	2005-07-18 21:10:18 UTC (rev 37327)
+++ CMF/branches/CMF-1_5-branch/CMFCore/tests/base/testcase.py	2005-07-19 11:07:04 UTC (rev 37328)
@@ -6,12 +6,13 @@
     import Zope as Zope2
 Zope2.startup()
 
-from os import curdir, mkdir, stat, remove
+import sys
+import time
+from os import chmod, curdir, mkdir, remove, stat, walk
 from os.path import join, abspath, dirname
 from shutil import copytree, rmtree
+from stat import S_IWRITE
 from tempfile import mktemp
-import sys
-import time
 
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
@@ -222,6 +223,10 @@
                       self._skinname),
                  join(self.tempname,
                       self._skinname))
+        # make sure we have a writable copy
+        for root, dirs, files in walk(self.tempname):
+            for name in dirs + files:
+                chmod(join(root, name), S_IWRITE)
         # store the skin path name
         self.skin_path_name = join(self.tempname,self._skinname,self._layername)
 

Modified: CMF/branches/CMF-1_5-branch/CMFCore/tests/test_FSZSQLMethod.py
===================================================================
--- CMF/branches/CMF-1_5-branch/CMFCore/tests/test_FSZSQLMethod.py	2005-07-18 21:10:18 UTC (rev 37327)
+++ CMF/branches/CMF-1_5-branch/CMFCore/tests/test_FSZSQLMethod.py	2005-07-19 11:07:04 UTC (rev 37328)
@@ -63,6 +63,10 @@
 
         self.fsZSQL = self.fsdir.testsql
 
+    def tearDown(self):
+        SecurityTest.tearDown(self)
+        FSZSQLMaker.tearDown(self)
+
     def test_customize( self ):
 
         self.fsZSQL.manage_doCustomize( folder_path='custom' )



More information about the CMF-checkins mailing list