def setSize(self, size): """Sets subscription size; the number of cores the show is allowed to use consistently. :type size: int :param size: the new subscription size """ assert (isinstance(size, int)), "size is not expected type: int" self.stub.SetSize(subscription_pb2.SubscriptionSetSizeRequest( subscription=self.data, new_size=size), timeout=Cuebot.Timeout)
def testSetSize(self, getStubMock): stubMock = mock.Mock() stubMock.SetSize.return_value = subscription_pb2.SubscriptionSetSizeResponse( ) getStubMock.return_value = stubMock subscription = opencue.wrappers.subscription.Subscription( subscription_pb2.Subscription(name='testSubscription')) subscription.setSize(16) stubMock.SetSize.assert_called_with( subscription_pb2.SubscriptionSetSizeRequest( subscription=subscription.data, new_size=16), timeout=mock.ANY)
def setSize(self, size): self.stub.SetSize(subscription_pb2.SubscriptionSetSizeRequest( subscription=self.data, new_size=size), timeout=Cuebot.Timeout)
def setSize(self, size): assert (isinstance(size, int)), "size is not expected type: int" self.stub.SetSize(subscription_pb2.SubscriptionSetSizeRequest( subscription=self.data, new_size=size), timeout=Cuebot.Timeout)