# Path: zaqarclient/queues/v1/claim.py
# class Claim(object):
#     def __init__(self, queue, id=None,
#                  ttl=None, grace=None, limit=None):
#     def __repr__(self):
#     def _get(self):
#     def _create(self):
#     def __iter__(self):
#     def age(self):
#     def ttl(self):
#     def delete(self):
#     def update(self, ttl=None, grace=None):
# 
# Path: zaqarclient/tests/queues/base.py
# MY_IP = netutils.get_my_ipv4()
# class QueuesTestBase(base.TestBase):
#     def setUp(self):
# 
# Path: zaqarclient/transport/errors.py
# class TransportError(errors.ZaqarError):
# class ResourceNotFound(TransportError):
# class MalformedRequest(TransportError):
# class UnauthorizedError(TransportError):
# class ForbiddenError(TransportError):
# class InternalServerError(TransportError):
# class ServiceUnavailableError(TransportError):
# class ConflictError(TransportError):
#     def __init__(self, title=None, description=None, text=None):
# 
# Path: zaqarclient/transport/response.py
# class Response(object):
#     def __init__(self, request, content, headers=None, status_code=None):
#     def deserialized_content(self):


import json
import mock
import time
from zaqarclient.queues.v1 import claim
from zaqarclient.tests.queues import base
from zaqarclient.transport import errors
from zaqarclient.transport import response
                self.assertEqual(result['messages'][num]['href'], msg.href)
            self.assertEqual(len(result['messages']), num_tested)

    def test_claim_update(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:

            resp = response.Response(None, None)
            send_method.return_value = resp

            self.queue.claim(id='5245432').update(ttl=444, grace=987)

            # NOTE(asalkeld): Nothing to assert here,
            # just checking our way down to the transport
            # doesn't crash.

    def test_claim_delete(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:

            resp = response.Response(None, None)
            send_method.return_value = resp

            self.queue.claim(id='4225').delete()

            # NOTE(asalkeld): Nothing to assert here,
            # just checking our way down to the transport
            # doesn't crash.



# Path: zaqarclient/queues/v1/claim.py
# class Claim(object):
#     def __init__(self, queue, id=None,
#                  ttl=None, grace=None, limit=None):
#     def __repr__(self):
#     def _get(self):
#     def _create(self):
#     def __iter__(self):
#     def age(self):
#     def ttl(self):
#     def delete(self):
#     def update(self, ttl=None, grace=None):
# 
# Path: zaqarclient/tests/queues/base.py
# MY_IP = netutils.get_my_ipv4()
# class QueuesTestBase(base.TestBase):
#     def setUp(self):
# 
# Path: zaqarclient/transport/errors.py
# class TransportError(errors.ZaqarError):
# class ResourceNotFound(TransportError):
# class MalformedRequest(TransportError):
# class UnauthorizedError(TransportError):
# class ForbiddenError(TransportError):
# class InternalServerError(TransportError):
# class ServiceUnavailableError(TransportError):
# class ConflictError(TransportError):
#     def __init__(self, title=None, description=None, text=None):
# 
# Path: zaqarclient/transport/response.py
# class Response(object):
#     def __init__(self, request, content, headers=None, status_code=None):
#     def deserialized_content(self):


# Path: zaqarclient/tests/queues/claims.py
import json
import mock
import time
from zaqarclient.queues.v1 import claim
from zaqarclient.tests.queues import base
from zaqarclient.transport import errors
from zaqarclient.transport import response

                self.assertEqual(result['messages'][num]['href'], msg.href)
            self.assertEqual(len(result['messages']), num_tested)

    def test_claim_update(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:

            resp = response.Response(None, None)
            send_method.return_value = resp

            self.queue.claim(id='5245432').update(ttl=444, grace=987)

            # NOTE(asalkeld): Nothing to assert here,
            # just checking our way down to the transport
            # doesn't crash.

    def test_claim_delete(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:

            resp = response.Response(None, None)
            send_method.return_value = resp

            self.queue.claim(id='4225').delete()

            # NOTE(asalkeld): Nothing to assert here,
            # just checking our way down to the transport
            # doesn't crash.



class QueuesV1ClaimFunctionalTest(base.QueuesTestBase):