def main(): client = Client(URL, LOGIN, PASSWD) children = client.getRoot().getChildren() print children for doc in children: print "Deleting:", doc.path doc.delete()
def setUp(self): self.client = Client(URL, LOGIN, PASSWD) self.session = self.client.getSession() self.folder1 = "folder%s" % random.randint(0, 1000000000) self.session.create("/", "Folder", self.folder1) self.folder2 = "folder%s" % random.randint(0, 1000000000) self.session.create("/", "Folder", self.folder2) self.file = "file%s" % random.randint(0, 1000000000) self.session.create("/" + self.folder1, "File", self.file)
def setUp(self): #self.client = Client(URL, LOGIN, PASSWD) self.client = Client(HOST) self.session = self.client.getSession() self.doc_name = "doc%s" % random.randint(0, 1000000000)
def setUp(self): self.client = Client(URL, LOGIN, PASSWD) self.session = self.client.getSession() self.doc_name = "doc%s" % random.randint(0, 1000000000) self.session.create("/", "File", self.doc_name)
def setUp(self): self.client = Client(URL, LOGIN, PASSWD) self.root = self.client.getRoot() testFolderName = "testfolder-%s" % time.time() self.testFolder = self.root.create(testFolderName, "Folder")
#!/usr/bin/env python import random import unittest import sys from config import * from nuxeolib import Client if __name__ == '__main__': user = sys.argv[1] host = "localhost:8081" client = Client(host) session = client.getSession() userinfo = session.read_user(user) if not userinfo: session.create_user(user, "a", user, "%[email protected]" % user, user) userinfo = session.read_user(user) print userinfo