コード例 #1
0
ファイル: vfs_local_tests.py プロジェクト: rdparker/obnam
    def test_lsetxattr(self):
        """lsetxattr() sets an attribute on a file."""

        if self.user_xattr_are_supported():
            _obnam.lsetxattr(self.filename, "user.key", "value")
            _obnam.lsetxattr(self.filename, "user.hello", "world")
            ret = _obnam.llistxattr(self.filename)

            self.assertEqual(sorted(ret.strip("\0").split("\0")), ["user.hello", "user.key"])
コード例 #2
0
ファイル: vfs_local_tests.py プロジェクト: secmff/obnam
    def test_lsetxattr(self):
        '''lsetxattr() sets an attribute on a file.'''

        if self.user_xattr_are_supported():
            _obnam.lsetxattr(self.filename, "user.key", "value")
            _obnam.lsetxattr(self.filename, "user.hello", "world")
            ret = _obnam.llistxattr(self.filename)

            self.assertEqual(sorted(ret.strip("\0").split("\0")),
                             ["user.hello", "user.key"])
コード例 #3
0
ファイル: vfs_local_tests.py プロジェクト: rdparker/obnam
    def test_empty_list(self):
        """A new file has no extended attributes."""

        if self.user_xattr_are_supported():
            self.assertEqual(_obnam.llistxattr(self.filename), "")
コード例 #4
0
ファイル: vfs_local_tests.py プロジェクト: nom3ad/obnam
    def test_empty_list(self):
        '''A new file has no extended attributes.'''

        if self.user_xattr_are_supported():
            self.assertEqual(_obnam.llistxattr(self.filename), "")
コード例 #5
0
ファイル: vfs_local_tests.py プロジェクト: bytearchive/obnam
 def test_lsetxattr(self):
     '''lsetxattr() sets an attribute on a file.'''
     _obnam.lsetxattr(self.filename, "user.key", "value")
     _obnam.lsetxattr(self.filename, "user.hello", "world")
     self.assertEqual(sorted(_obnam.llistxattr(self.filename).strip("\0").split("\0")),
                      ["user.hello", "user.key"])
コード例 #6
0
ファイル: vfs_local_tests.py プロジェクト: bytearchive/obnam
 def test_empty_list(self):
     '''A new file has no extended attributes.'''
     self.assertEqual(_obnam.llistxattr(self.filename), "")