Skip to content

Commit

Permalink
have Python tests create Chmod2 requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtbc committed Apr 29, 2015
1 parent 3fa25b1 commit 62d8c2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions components/tests/python/library/__init__.py
Expand Up @@ -36,7 +36,7 @@
import Glacier2
import omero
import omero.gateway
from omero.cmd import DoAll, State, ERR, OK, Chmod, Chgrp2, Delete2
from omero.cmd import DoAll, State, ERR, OK, Chmod2, Chgrp2, Delete2
from omero.callbacks import CmdCallbackI
from omero.model import DatasetI, DatasetImageLinkI, ImageI, ProjectI
from omero.model import Annotation, FileAnnotationI, OriginalFileI
Expand Down Expand Up @@ -986,7 +986,7 @@ def change_permissions(self, gid, perms, client=None):
"""
Changes the permissions of an ExperimenterGroup object.
Accepts a client instance to guarantee calls in correct user contexts.
Creates Chmod commands and calls :func:`~test.ITest.doSubmit`.
Creates Chmod2 commands and calls :func:`~test.ITest.doSubmit`.
:param gid: id of an ExperimenterGroup
:param perms: permissions string
Expand All @@ -995,8 +995,8 @@ def change_permissions(self, gid, perms, client=None):
if client is None:
client = self.client

command = Chmod(
type="/ExperimenterGroup", id=gid, permissions=perms)
command = Chmod2(
targetObjects={'ExperimenterGroup': [gid]}, permissions=perms)

self.doSubmit(command, client)

Expand Down
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-

#
# Copyright (C) 2013-2014 University of Dundee & Open Microscopy Environment.
# Copyright (C) 2013-2015 University of Dundee & Open Microscopy Environment.
# All rights reserved. Use is subject to license terms supplied in LICENSE.txt
#
# This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -74,8 +74,8 @@ def teardown_method(self, method):

def chmodGroupAs(self, user, perms, succeed=True):
client = self.clients[user]
chmod = omero.cmd.Chmod(
type="/ExperimenterGroup", id=self.group.id.val,
chmod = omero.cmd.Chmod2(
targetObjects={'ExperimenterGroup': [self.group.id.val]},
permissions=perms)
self.doSubmit(chmod, client, test_should_pass=succeed)

Expand Down

0 comments on commit 62d8c2a

Please sign in to comment.