def testSave(self, getStubMock): stubMock = mock.Mock() stubMock.Save.return_value = comment_pb2.CommentSaveResponse() getStubMock.return_value = stubMock comment = opencue.wrappers.comment.Comment( comment_pb2.Comment(message=TEST_COMMENT_MESSAGE)) comment.save() stubMock.Save.assert_called_with( comment_pb2.CommentSaveRequest(comment=comment.data), timeout=mock.ANY)
def save(self): """Saves the current comment values.""" self.stub.Save(comment_pb2.CommentSaveRequest(comment=self.data), timeout=Cuebot.Timeout)