Exemplo n.º 1
0
    def subscription(self, id):
        """
        Returns a single subscription

        :param id: The subscription id, String
        """
        return Subscription.find_with_client(id, self)
 def test_cancel_puts(self):
     client = mock.Mock()
     sub = Subscription(fixtures.subscription_json, client)
     sub.cancel()
     client.api_put.assert_called_with("/subscriptions/{0}/cancel".format(
         fixtures.subscription_json["id"]))