Beispiel #1
0
 def setAutoEating(self, value):
     """If set to true, any frames that would become dead, will become eaten
     @type  value: bool
     @param value: State of autoeat"""
     self.stub.SetAutoEat(job_pb2.JobSetAutoEatRequest(job=self.data,
                                                       value=value),
                          timeout=Cuebot.Timeout)
Beispiel #2
0
    def setAutoEating(self, value):
        """Sets the job autoeat field.

        If set to true, any frames that would become dead will become eaten.

        :type  value: bool
        :param value: whether job should autoeat
        """
        self.stub.SetAutoEat(job_pb2.JobSetAutoEatRequest(job=self.data,
                                                          value=value),
                             timeout=Cuebot.Timeout)
Beispiel #3
0
    def testSetAutoEating(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.SetAutoEat.return_value = job_pb2.JobSetAutoEatResponse()
        getStubMock.return_value = stubMock

        value = True
        job = opencue.wrappers.job.Job(
            job_pb2.Job(name=TEST_JOB_NAME))
        job.setAutoEating(value)

        stubMock.SetAutoEat.assert_called_with(
            job_pb2.JobSetAutoEatRequest(job=job.data, value=value), timeout=mock.ANY)