summaryrefslogtreecommitdiff
path: root/test-sftpfs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-12-18 13:39:43 +0000
committerLars Wirzenius <liw@liw.fi>2011-12-18 13:39:43 +0000
commit6201e4fb45a877908c55f6ab78172d6b27042ade (patch)
tree87fa5a0b6a84335b1dbd84d942a64d38d6ae1985 /test-sftpfs
parentf174f6f06adc7fe5931d83e9e9f19aa8ec363ba0 (diff)
downloadobnam-6201e4fb45a877908c55f6ab78172d6b27042ade.tar.gz
add tests to verify sftp plugin always returns None for user/group names
Diffstat (limited to 'test-sftpfs')
-rwxr-xr-xtest-sftpfs6
1 files changed, 6 insertions, 0 deletions
diff --git a/test-sftpfs b/test-sftpfs
index 4d7e626b..05815549 100755
--- a/test-sftpfs
+++ b/test-sftpfs
@@ -69,6 +69,12 @@ class SftpTests(unittest.TestCase, obnamlib.VfsTests):
self.assertEqual(self.fs.lstat('foo').st_mtime_sec, 3)
self.assertEqual(self.fs.lstat('foo').st_mtime_nsec, 0)
+ def test_get_username_returns_None_for_zero(self):
+ self.assertEqual(self.fs.get_username(0), None)
+
+ def test_get_groupname_returns_None_for_zero(self):
+ self.assertEqual(self.fs.get_groupname(0), None)
+
if __name__ == '__main__':
unittest.main()