[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/tests/test_DirectoryView.py - more test fixes
Yvo Schubbe
y.2011 at wcm-solutions.de
Tue Feb 8 11:53:24 EST 2011
Log message for revision 120221:
- more test fixes
Changed:
U Products.CMFCore/trunk/Products/CMFCore/tests/test_DirectoryView.py
-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/tests/test_DirectoryView.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/tests/test_DirectoryView.py 2011-02-08 16:35:34 UTC (rev 120220)
+++ Products.CMFCore/trunk/Products/CMFCore/tests/test_DirectoryView.py 2011-02-08 16:53:24 UTC (rev 120221)
@@ -239,18 +239,15 @@
WritableFSDVTest.setUp(self)
self.saved_cfg_debug_mode = getConfiguration().debug_mode
getConfiguration().debug_mode = True
- self.test1path = join(self.skin_path_name,'test1.py')
- self.test2path = join(self.skin_path_name,'test2.py')
- self.testdpath = join(self.skin_path_name,'test_directory')
# initialise skins
self._registerDirectory(self)
# add a method to the fake skin folder
- self._writeFile(self.test2path, "return 'test2'")
+ self._writeFile('test2.py', "return 'test2'")
# edit the test1 method
- self._writeFile(self.test1path, "return 'new test1'")
+ self._writeFile('test1.py', "return 'new test1'")
# add a new folder
mkdir(join(self.skin_path_name,'test3'))
@@ -273,25 +270,25 @@
def test_DeleteMethod( self ):
# Make sure a deleted method goes away
- remove(self.test2path)
+ remove(join(self.skin_path_name, 'test2.py'))
self.failIf(hasattr(self.ob.fake_skin,'test2'))
def test_DeleteAddEditMethod( self ):
# Check that if we delete a method, then add it back,
# then edit it, the DirectoryView notices.
# This exercises yet another Win32 mtime weirdity.
- remove(self.test2path)
+ remove(join(self.skin_path_name, 'test2.py'))
self.failIf(hasattr(self.ob.fake_skin,'test2'))
# add method back to the fake skin folder
- self._writeFile(self.test2path, "return 'test2.2'",
+ self._writeFile('test2.py', "return 'test2.2'",
self.use_dir_mtime)
# check
self.assertEqual(self.ob.fake_skin.test2(),'test2.2')
# edit method
- self._writeFile(self.test2path, "return 'test2.3'",
+ self._writeFile('test2.py', "return 'test2.3'",
self.use_dir_mtime)
# check
@@ -304,7 +301,7 @@
def test_DeleteFolder(self):
# Make sure a deleted folder goes away
self.failUnless(hasattr(self.ob.fake_skin, 'test_directory'))
- self._deleteDirectory('test_directory')
+ self._deleteDirectory('test_directory', self.use_dir_mtime)
self.failIf(hasattr(self.ob.fake_skin, 'test_directory'))
More information about the checkins
mailing list