def setMinMemory(self, memory): """Sets the minimum amount of memory that this layer requires. in Kb @type memory: int @param memory: Minimum Kb memory reserved by each frame""" return self.stub.SetMinMemory(job_pb2.LayerSetMinMemoryRequest( layer=self.data, memory=memory), timeout=Cuebot.Timeout)
def testSetMinMemory(self, getStubMock): stubMock = mock.Mock() stubMock.SetMinMemory.return_value = job_pb2.LayerSetMinMemoryResponse() getStubMock.return_value = stubMock memory = 2048 layer = opencue.wrappers.layer.Layer( job_pb2.Layer(name=TEST_LAYER_NAME)) layer.setMinMemory(memory) stubMock.SetMinMemory.assert_called_with( job_pb2.LayerSetMinMemoryRequest(layer=layer.data, memory=memory), timeout=mock.ANY)