diff options
Diffstat (limited to 'test/functional/libgfapi-python-tests.py')
-rw-r--r-- | test/functional/libgfapi-python-tests.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/libgfapi-python-tests.py b/test/functional/libgfapi-python-tests.py index 8bcbf45..4dbdf2d 100644 --- a/test/functional/libgfapi-python-tests.py +++ b/test/functional/libgfapi-python-tests.py @@ -163,6 +163,16 @@ class FileOpsTest(unittest.TestCase): except OSError as e: self.fail(e.message) + def test_chmod(self): + stat = self.vol.stat(self.path) + orig_mode = oct(stat.st_mode & 0777) + self.assertEqual(orig_mode, '0644L') + ret = self.vol.chmod(self.path, 0600) + self.assertEqual(ret, 0) + stat = self.vol.stat(self.path) + new_mode = oct(stat.st_mode & 0777) + self.assertEqual(new_mode, '0600L') + def test_exists(self): e = self.vol.exists(self.path) self.assertTrue(e) |