# Path: zaqarclient/queues/v1/iterator.py
# class _Iterator(object):
#     def __init__(self, client, listing_response, iter_key, create_function):
#     def __iter__(self):
#     def get_iterables(self, iterables):
#     def stream(self, enabled=True):
#     def _next_page(self):
#     def __next__(self):
# 
# Path: zaqarclient/tests/queues/base.py
# MY_IP = netutils.get_my_ipv4()
# class QueuesTestBase(base.TestBase):
#     def setUp(self):
# 
# 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 iterator
from zaqarclient.tests.queues import base
from zaqarclient.transport import response
                        'uri': 'sqlite://',
                        'options': {}}

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

            resp = response.Response(None, json.dumps(updated_data))
            send_method.return_value = resp

            pool = self.client.pool('test', **pool_data)
            pool.update({'weight': 20})
            self.assertEqual(20, pool.weight)

    def test_pool_list(self):
        returned = {
            'links': [{
                'rel': 'next',
                'href': '/v1.1/pools?marker=6244-244224-783'
            }],
            'pools': [{
                'name': 'stomach',
                'weight': 20,
                'uri': 'sqlite://',
                'options': {}
            }]
        }

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


# Path: zaqarclient/queues/v1/iterator.py
# class _Iterator(object):
#     def __init__(self, client, listing_response, iter_key, create_function):
#     def __iter__(self):
#     def get_iterables(self, iterables):
#     def stream(self, enabled=True):
#     def _next_page(self):
#     def __next__(self):
# 
# Path: zaqarclient/tests/queues/base.py
# MY_IP = netutils.get_my_ipv4()
# class QueuesTestBase(base.TestBase):
#     def setUp(self):
# 
# 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/pool.py
import json
import mock
from zaqarclient.queues.v1 import iterator
from zaqarclient.tests.queues import base
from zaqarclient.transport import response

                        'uri': 'sqlite://',
                        'options': {}}

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

            resp = response.Response(None, json.dumps(updated_data))
            send_method.return_value = resp

            pool = self.client.pool('test', **pool_data)
            pool.update({'weight': 20})
            self.assertEqual(20, pool.weight)

    def test_pool_list(self):
        returned = {
            'links': [{
                'rel': 'next',
                'href': '/v1.1/pools?marker=6244-244224-783'
            }],
            'pools': [{
                'name': 'stomach',
                'weight': 20,
                'uri': 'sqlite://',
                'options': {}
            }]
        }

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


            resp = response.Response(None, json.dumps(returned))