Пример #1
0
    def setDefaultJobMaxCores(self, value):
        """Sets the default job maximum cores for everything in the group.

        :type  value: int
        :param value: new default job maximum cores
        """
        self.stub.SetDefaultJobMaxCores(job_pb2.GroupSetDefJobMaxCoresRequest(
            group=self.data, max_cores=value),
                                        timeout=Cuebot.Timeout)
Пример #2
0
    def testSetDefaultJobMaxCores(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.SetDefaultJobMaxCores.return_value = job_pb2.GroupSetDefJobMaxCoresResponse()
        getStubMock.return_value = stubMock

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

        stubMock.SetDefaultJobMaxCores.assert_called_with(
            job_pb2.GroupSetDefJobMaxCoresRequest(group=group.data, max_cores=value),
            timeout=mock.ANY)
Пример #3
0
 def setDefaultJobMaxCores(self, value):
     self.stub.SetDefaultJobMaxCores(job_pb2.GroupSetDefJobMaxCoresRequest(
         group=self.data, max_cores=value),
                                     timeout=Cuebot.Timeout)