From b415ac86e35eb73409cc37092e7855ee8133249f Mon Sep 17 00:00:00 2001 From: gbn Date: Sun, 13 Mar 2011 15:35:14 -0400 Subject: [PATCH] Modification to symlink test case (that will actually fail when it should -- find_mount_point using abspath instead of realpath.) --- test_plat_other.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test_plat_other.py b/test_plat_other.py index 9b6ae31..9beaaf9 100644 --- a/test_plat_other.py +++ b/test_plat_other.py @@ -112,11 +112,16 @@ class TestSymlink(TestExtVol): # Since is_parent uses realpath(), and our getdev uses is_parent, # this should work self.slDir = mktemp(prefix='s2t', dir=op.expanduser('~')) - os.symlink(self.trashTopdir, self.slDir) + + os.mkdir(op.join(self.trashTopdir, 'subdir'), 0o700) + self.filePath = op.join(self.trashTopdir, 'subdir', self.fileName) + touch(self.filePath) + os.symlink(op.join(self.trashTopdir, 'subdir'), self.slDir) def test_trash(self): s2t(op.join(self.slDir, self.fileName)) self.assertFalse(op.exists(self.filePath)) + self.assertTrue(op.exists(op.join(self.trashTopdir, '.Trash-' + str(os.getuid()), 'files', self.fileName))) def tearDown(self): os.remove(self.slDir)