def test_mkdir(self): # in these cases the getFolder() call should raise an exception if # the mkdir did not create the dir successfully # admin, alice, and bob have write privileges Folder.mkdirAssertAllowed(self.admin, '/f1/byAdmin') Folder.getFolderAssertAllowed(self.admin, '/f1/byAdmin') Folder.mkdirAssertAllowed(self.alice, '/f1/byAlice') Folder.getFolderAssertAllowed(self.alice, '/f1/byAlice') Folder.mkdirAssertAllowed(self.bob, '/f1/byBob') Folder.getFolderAssertAllowed(self.bob, '/f1/byBob') # clara has only read privileges, denied def byClara(): Folder.mkdirAssertAllowed(self.clara, '/f1/byClara') self.assertRaises(PermissionDenied, byClara)
def byClara(): Folder.mkdirAssertAllowed(self.clara, '/f1/byClara')