def test_error(self): path = '/tmp/ops-chown-error' self.assertFalse(ops._chown(path, uid=-2)) self.assertFalse(ops._chown(path, gid=-2)) self.assertFalse(ops.chown(path, user=lambda x: x)) self.assertFalse(ops.chown(path, user='******')) self.assertFalse(ops.chown(path, user=ops.user('ops-chown'))) self.assertFalse(ops.chown(path, group=lambda x: x)) self.assertFalse(ops.chown(path, group='ops-chown')) self.assertFalse(ops.chown(path, group=ops.user('ops-chown')))
def test_recursive(self): ops.chown(self.workspace.path, user=self.user, group=self.group, recursive=True)
def test_chown(self): ops.chown(self.workspace.path, user=self.user, group=self.group)
def test_group(self): ops.chown(self.workspace.path, group=self.group)
def test_user(self): ops.chown(self.workspace.path, user=self.user)
def test_gid_darwin(self, chown): ops.chown(self.workspace.path, group=self.gid) chown.assert_called_with(self.workspace.path, self.uid, self.gid)