# Path: zaqarclient/queues/v1/core.py
# def _common_queue_ops(operation, transport, request, name, callback=None):
# def queue_create(transport, request, name,
#                  metadata=None, callback=None):
# def queue_update(transport, request, name, metadata, callback=None):
# def queue_exists(transport, request, name, callback=None):
# def queue_get(transport, request, name, callback=None):
# def queue_get_metadata(transport, request, name, callback=None):
# def queue_set_metadata(transport, request, name, metadata, callback=None):
# def queue_get_stats(transport, request, name):
# def queue_delete(transport, request, name, callback=None):
# def queue_list(transport, request, callback=None, **kwargs):
# def message_list(transport, request, queue_name, callback=None, **kwargs):
# def message_post(transport, request, queue_name, messages, callback=None):
# def message_get(transport, request, queue_name, message_id, callback=None):
# def message_get_many(transport, request, queue_name, messages, callback=None):
# def message_delete(transport, request, queue_name, message_id,
#                    claim_id=None, callback=None):
# def message_delete_many(transport, request, queue_name,
#                         ids, callback=None):
# def message_pop(transport, request, queue_name,
#                 count, callback=None):
# def claim_create(transport, request, queue_name, **kwargs):
# def claim_get(transport, request, queue_name, claim_id):
# def claim_update(transport, request, queue_name, claim_id, **kwargs):
# def claim_delete(transport, request, queue_name, claim_id):
# def pool_get(transport, request, pool_name, callback=None):
# def pool_create(transport, request, pool_name, pool_data):
# def pool_update(transport, request, pool_name, pool_data):
# def pool_list(transport, request, **kwargs):
# def pool_delete(transport, request, pool_name):
# def flavor_create(transport, request, name, flavor_data):
# def flavor_get(transport, request, flavor_name, callback=None):
# def flavor_update(transport, request, flavor_name, flavor_data):
# def flavor_list(transport, request, **kwargs):
# def flavor_delete(transport, request, name):
# def health(transport, request, callback=None):
# 
# Path: zaqarclient/tests/base.py
# _USE_AUTHENTICATION = os.environ.get('ZAQARCLIENT_AUTH_FUNCTIONAL', False)
# _RUN_FUNCTIONAL = os.environ.get('ZAQARCLIENT_TEST_FUNCTIONAL',
#                                  _USE_AUTHENTICATION)
# class TestBase(testtools.TestCase):
#     def setUp(self):
#     def _credentials(self, cloud='devstack-admin'):
#     def _setup_auth_params(self):
#     def config(self, group=None, **kw):
# 
# Path: zaqarclient/tests/transport/dummy.py
# class DummyTransport(base.Transport):
#     def send(self, request):
# 
# 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/request.py
# def prepare_request(auth_opts=None, data=None, **kwargs):
#     def __init__(self, endpoint='', operation='',
#                  ref='', content=None, params=None,
#                  headers=None, api=None, verify=True, cert=None, session=None):
#     def api(self):
#     def validate(self):
# class Request(object):
# 
# 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
from zaqarclient.queues.v1 import core
from zaqarclient.tests import base
from zaqarclient.tests.transport import dummy
from zaqarclient.transport import errors
from zaqarclient.transport import request
from zaqarclient.transport import response
            send_method.return_value = resp

            ids = ['a', 'b']
            req = request.Request()
            core.message_delete_many(self.transport, req,
                                     'test', ids=ids)

            self.assertIn('queue_name', req.params)
            self.assertIn('ids', req.params)
            self.assertEqual(ids, req.params['ids'])

    # ADMIN API
    def test_pool_create(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:
            resp = response.Response(None, None)
            send_method.return_value = resp

            req = request.Request()
            core.pool_create(self.transport, req,
                             'test_pool', {'uri': 'sqlite://',
                                           'weight': 0})

    def test_pool_get(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:
            resp = response.Response(None, None)
            send_method.return_value = resp

            req = request.Request()

# Path: zaqarclient/queues/v1/core.py
# def _common_queue_ops(operation, transport, request, name, callback=None):
# def queue_create(transport, request, name,
#                  metadata=None, callback=None):
# def queue_update(transport, request, name, metadata, callback=None):
# def queue_exists(transport, request, name, callback=None):
# def queue_get(transport, request, name, callback=None):
# def queue_get_metadata(transport, request, name, callback=None):
# def queue_set_metadata(transport, request, name, metadata, callback=None):
# def queue_get_stats(transport, request, name):
# def queue_delete(transport, request, name, callback=None):
# def queue_list(transport, request, callback=None, **kwargs):
# def message_list(transport, request, queue_name, callback=None, **kwargs):
# def message_post(transport, request, queue_name, messages, callback=None):
# def message_get(transport, request, queue_name, message_id, callback=None):
# def message_get_many(transport, request, queue_name, messages, callback=None):
# def message_delete(transport, request, queue_name, message_id,
#                    claim_id=None, callback=None):
# def message_delete_many(transport, request, queue_name,
#                         ids, callback=None):
# def message_pop(transport, request, queue_name,
#                 count, callback=None):
# def claim_create(transport, request, queue_name, **kwargs):
# def claim_get(transport, request, queue_name, claim_id):
# def claim_update(transport, request, queue_name, claim_id, **kwargs):
# def claim_delete(transport, request, queue_name, claim_id):
# def pool_get(transport, request, pool_name, callback=None):
# def pool_create(transport, request, pool_name, pool_data):
# def pool_update(transport, request, pool_name, pool_data):
# def pool_list(transport, request, **kwargs):
# def pool_delete(transport, request, pool_name):
# def flavor_create(transport, request, name, flavor_data):
# def flavor_get(transport, request, flavor_name, callback=None):
# def flavor_update(transport, request, flavor_name, flavor_data):
# def flavor_list(transport, request, **kwargs):
# def flavor_delete(transport, request, name):
# def health(transport, request, callback=None):
# 
# Path: zaqarclient/tests/base.py
# _USE_AUTHENTICATION = os.environ.get('ZAQARCLIENT_AUTH_FUNCTIONAL', False)
# _RUN_FUNCTIONAL = os.environ.get('ZAQARCLIENT_TEST_FUNCTIONAL',
#                                  _USE_AUTHENTICATION)
# class TestBase(testtools.TestCase):
#     def setUp(self):
#     def _credentials(self, cloud='devstack-admin'):
#     def _setup_auth_params(self):
#     def config(self, group=None, **kw):
# 
# Path: zaqarclient/tests/transport/dummy.py
# class DummyTransport(base.Transport):
#     def send(self, request):
# 
# 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/request.py
# def prepare_request(auth_opts=None, data=None, **kwargs):
#     def __init__(self, endpoint='', operation='',
#                  ref='', content=None, params=None,
#                  headers=None, api=None, verify=True, cert=None, session=None):
#     def api(self):
#     def validate(self):
# class Request(object):
# 
# Path: zaqarclient/transport/response.py
# class Response(object):
#     def __init__(self, request, content, headers=None, status_code=None):
#     def deserialized_content(self):


# Path: tests/unit/queues/v1/test_core.py
import json
import mock
from zaqarclient.queues.v1 import core
from zaqarclient.tests import base
from zaqarclient.tests.transport import dummy
from zaqarclient.transport import errors
from zaqarclient.transport import request
from zaqarclient.transport import response

            send_method.return_value = resp

            ids = ['a', 'b']
            req = request.Request()
            core.message_delete_many(self.transport, req,
                                     'test', ids=ids)

            self.assertIn('queue_name', req.params)
            self.assertIn('ids', req.params)
            self.assertEqual(ids, req.params['ids'])

    # ADMIN API
    def test_pool_create(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:
            resp = response.Response(None, None)
            send_method.return_value = resp

            req = request.Request()
            core.pool_create(self.transport, req,
                             'test_pool', {'uri': 'sqlite://',
                                           'weight': 0})

    def test_pool_get(self):
        with mock.patch.object(self.transport, 'send',
                               autospec=True) as send_method:
            resp = response.Response(None, None)
            send_method.return_value = resp

            req = request.Request()

            core.pool_get(self.transport, req,