Пример #1
0
    def testDelete(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = task_pb2.TaskDeleteResponse()
        getStubMock.return_value = stubMock

        task = opencue.wrappers.task.Task(task_pb2.Task(name='testTask'))
        task.delete()

        stubMock.Delete.assert_called_with(
            task_pb2.TaskDeleteRequest(task=task.data), timeout=mock.ANY)
Пример #2
0
 def delete(self):
     """Deletes this task"""
     self.stub.Delete(task_pb2.TaskDeleteRequest(task=self.task),
                      timeout=Cuebot.Timeout)
Пример #3
0
 def delete(self):
     """Deletes the task."""
     self.stub.Delete(task_pb2.TaskDeleteRequest(task=self.data),
                      timeout=Cuebot.Timeout)