Exemplo n.º 1
0
    def setMaxCores(self, value):
        """Sets the maximum cores of everything in the group.

        :type  value: int
        :param value: new maximum number of cores
        """
        self.stub.SetMaxCores(job_pb2.GroupSetMaxCoresRequest(group=self.data, max_cores=value),
                              timeout=Cuebot.Timeout)
Exemplo n.º 2
0
    def testSetMaxCores(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.SetMaxCores.return_value = job_pb2.GroupSetMaxCoresResponse()
        getStubMock.return_value = stubMock

        value = 523
        group = opencue.wrappers.group.Group(
            job_pb2.Group(name=TEST_GROUP_NAME))
        group.setMaxCores(value)

        stubMock.SetMaxCores.assert_called_with(
            job_pb2.GroupSetMaxCoresRequest(group=group.data, max_cores=value),
            timeout=mock.ANY)
Exemplo n.º 3
0
 def setMaxCores(self, value):
     self.stub.SetMaxCores(job_pb2.GroupSetMaxCoresRequest(group=self.data,
                                                           max_cores=value),
                           timeout=Cuebot.Timeout)