5
from twisted.trial import unittest
7
from supermirrorsftp.sftponly import SFTPOnlyAvatar
8
from supermirrorsftp.bazaarfs import SFTPServerRoot
10
class TestTopLevelDir(unittest.TestCase):
11
def testListDir(self):
12
# list only user dir + team dirs
13
tmpdir = self.mktemp()
15
userDict = {'id': 1, 'name': 'alice', 'teams': []}
16
avatar = SFTPOnlyAvatar('alice', tmpdir, '/dev/null', userDict)
17
root = SFTPServerRoot(avatar)
19
[name for name, child in root.children()],
20
['.', '..', '~alice'])
23
def testAllWriteOpsForbidden(self):