Esempio n. 1
0
    def testLock(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Lock.return_value = host_pb2.HostLockResponse()
        getStubMock.return_value = stubMock

        host = opencue.wrappers.host.Host(host_pb2.Host(name=TEST_HOST_NAME))
        host.lock()

        stubMock.Lock.assert_called_with(
            host_pb2.HostLockRequest(host=host.data), timeout=mock.ANY)
Esempio n. 2
0
 def lock(self):
     """Locks the host so that it no longer accepts new frames"""
     self.stub.Lock(host_pb2.HostLockRequest(host=self.data),
                    timeout=Cuebot.Timeout)