Пример #1
0
    def testDelete(self, getStubMock):
        stubMock = mock.Mock()
        stubMock.Delete.return_value = subscription_pb2.SubscriptionDeleteResponse(
        )
        getStubMock.return_value = stubMock

        subscription = opencue.wrappers.subscription.Subscription(
            subscription_pb2.Subscription(name=TEST_SUBSCRIPTION_NAME))
        subscription.delete()

        stubMock.Delete.assert_called_with(
            subscription_pb2.SubscriptionDeleteRequest(
                subscription=subscription.data),
            timeout=mock.ANY)
Пример #2
0
 def delete(self):
     self.stub.Delete(
         subscription_pb2.SubscriptionDeleteRequest(subscription=self.data),
         timeout=Cuebot.Timeout)