Beispiel #1
0
    def testUnlock(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Unlock.return_value = host_pb2.HostUnlockResponse()
        getStubMock.return_value = stubMock

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

        stubMock.Unlock.assert_called_with(
            host_pb2.HostUnlockRequest(host=host.data), timeout=mock.ANY)
Beispiel #2
0
 def unlock(self):
     """Unlocks the host and cancels any actions that were waiting for all
     running frames to finish.
     """
     self.stub.Unlock(host_pb2.HostUnlockRequest(host=self.data),
                      timeout=Cuebot.Timeout)