def setUp(self):
    base.TestCase.setUp(self)
    self.users = [User().createUser(('usr%s' % num), 'passwd', 'tst', 'usr', ('example@example.com' % num)) for num in [0, 1]]
    folders = Folder().childFolders(self.users[0], 'user', user=self.users[0])
    for folder in folders:
        if (folder['name'] == 'Public'):
            self.publicFolder = folder
        else:
            self.privateFolder = folder
    self.assetstore = Assetstore().getCurrent()
    root = self.assetstore['root']
    shutil.rmtree(root)
    tmpdir = os.path.join(root, 'temp')
    if os.path.isdir(tmpdir):
        for tempname in os.listdir(tmpdir):
            os.remove(os.path.join(tmpdir, tempname))
def setUp(self):
    base.TestCase.setUp(self)
    self.users = [User().createUser(('usr%s' % num), 'passwd', 'tst', 'usr', ('example@example.com' % num)) for num in [0, 1]]
    folders = Folder().childFolders(self.users[0], 'user', user=self.users[0])
    for folder in folders:
        if (folder['name'] == 'Public'):
            self.publicFolder = folder
        else:
            self.privateFolder = folder
    self.assetstore = Assetstore().getCurrent()
    root = self.assetstore['root']
    shutil.rmtree(root)
    tmpdir = os.path.join(root, 'temp')
    if os.path.isdir(tmpdir):
        for tempname in os.listdir(tmpdir):
            os.remove(os.path.join(tmpdir, tempname))