Beispiel #1
0
    def testEnableDispatching(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.EnableDispatching.return_value = show_pb2.ShowEnableDispatchingResponse()
        getStubMock.return_value = stubMock

        show = opencue.wrappers.show.Show(show_pb2.Show(name=TEST_SHOW_NAME))
        show.enableDispatching(TEST_ENABLE_VALUE)

        stubMock.EnableDispatching.assert_called_with(
            show_pb2.ShowEnableDispatchingRequest(show=show.data, enabled=TEST_ENABLE_VALUE),
            timeout=mock.ANY)
Beispiel #2
0
 def enableDispatching(self, value):
     """Enable dispatching on the show
     @type: Boolean
     @param: Whether or not to enable booking
     @rtype: show_pb2.ShowEnableDispatchingResponse
     @return: Response is empty
     """
     response = self.stub.EnableDispatching(
         show_pb2.ShowEnableDispatchingRequest(show=self.data,
                                               enabled=value),
         timeout=Cuebot.Timeout)
     return response
Beispiel #3
0
    def enableDispatching(self, value):
        """Enables or disables dispatching on the show.

        :type value: bool
        :param value: whether to enable booking
        :rtype:  show_pb2.ShowEnableDispatchingResponse
        :return: response is empty
        """
        response = self.stub.EnableDispatching(
            show_pb2.ShowEnableDispatchingRequest(show=self.data,
                                                  enabled=value),
            timeout=Cuebot.Timeout)
        return response