Esempio n. 1
0
    def testDelete(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = comment_pb2.CommentDeleteResponse()
        getStubMock.return_value = stubMock

        comment = opencue.wrappers.comment.Comment(
            comment_pb2.Comment(message=TEST_COMMENT_MESSAGE))
        comment.delete()

        stubMock.Delete.assert_called_with(
            comment_pb2.CommentDeleteRequest(comment=comment.data), timeout=mock.ANY)
Esempio n. 2
0
 def delete(self):
     """Deletes this comment."""
     self.stub.Delete(comment_pb2.CommentDeleteRequest(comment=self.data),
                      timeout=Cuebot.Timeout)