def METHOD_NAME(self):
    req = qrlmining_pb2.SubmitMinedBlockReq(blob=b'minedblob')
    # Submit mined block encountered an error
    self.qrlnode.submit_mined_block = MagicMock(return_value=False)
    answer = self.service.SubmitMinedBlock(req, context=None)
    self.assertTrue(answer.error)
    # This time it was successful
    self.qrlnode.submit_mined_block = MagicMock(return_value=True)
    answer = self.service.SubmitMinedBlock(req, context=None)
    self.assertFalse(answer.error)