# Path: kiel/zookeeper/allocator.py
# class PartitionAllocator(object):
#     def __init__(
#             self,
#             zk_hosts,
#             group_name,
#             consumer_name,
#             allocator_fn,
#             on_rebalance=None
#     ):
#     def allocation(self):
#     def members_path(self):
#     def partition_path(self):
#     def start(self, seed_partitions):
#     def stop(self):
#     def connect(self):
#     def handle_connection_change(self, state):
#     def on_group_members_change(self, new_members):
#     def on_partition_change(self, new_partitions):
#     def add_partitions(self, partitions):
#     def remove_partitions(self, old_partitions):
#     def rebalance(self):
# def create_attempter(f):
#     def attempt(fn, *args, **kwargs):


import unittest
from mock import patch
from kiel.zookeeper import allocator




@patch.object(allocator, "SharedSet")
@patch.object(allocator, "Party")
class PartitionAllocatorTests(unittest.TestCase):

    def setUp(self):
        super(PartitionAllocatorTests, self).setUp()

        kazoo_patcher = patch.object(allocator, "client")
        mock_client = kazoo_patcher.start()
        self.addCleanup(kazoo_patcher.stop)

        self.KazooClient = mock_client.KazooClient

    def test_defaults(self, Party, SharedSet):

        def alloc(members, partitions):
            pass


# Path: kiel/zookeeper/allocator.py
# class PartitionAllocator(object):
#     def __init__(
#             self,
#             zk_hosts,
#             group_name,
#             consumer_name,
#             allocator_fn,
#             on_rebalance=None
#     ):
#     def allocation(self):
#     def members_path(self):
#     def partition_path(self):
#     def start(self, seed_partitions):
#     def stop(self):
#     def connect(self):
#     def handle_connection_change(self, state):
#     def on_group_members_change(self, new_members):
#     def on_partition_change(self, new_partitions):
#     def add_partitions(self, partitions):
#     def remove_partitions(self, old_partitions):
#     def rebalance(self):
# def create_attempter(f):
#     def attempt(fn, *args, **kwargs):


# Path: tests/zookeeper/test_allocator.py
import unittest
from mock import patch
from kiel.zookeeper import allocator





@patch.object(allocator, "SharedSet")
@patch.object(allocator, "Party")
class PartitionAllocatorTests(unittest.TestCase):

    def setUp(self):
        super(PartitionAllocatorTests, self).setUp()

        kazoo_patcher = patch.object(allocator, "client")
        mock_client = kazoo_patcher.start()
        self.addCleanup(kazoo_patcher.stop)

        self.KazooClient = mock_client.KazooClient

    def test_defaults(self, Party, SharedSet):

        def alloc(members, partitions):
            pass


        a = allocator.PartitionAllocator(