def test_buildZooKeeperHosts_single(self): hosts = [ zk.ZooKeeperConnectionConfig('127.0.0.1', port=2181, chroot='/test1') ] self.assertEqual('127.0.0.1:2181/test1', zk.buildZooKeeperHosts(hosts))
def test_buildZooKeeperHosts_multiple(self): hosts = [ dict(host='127.0.0.1', port=2181, chroot='/test1'), dict(host='127.0.0.2', port=2182, chroot='/test2') ] self.assertEqual('127.0.0.1:2181/test1,127.0.0.2:2182/test2', zk.buildZooKeeperHosts(hosts))
def test_buildZooKeeperHosts_single(self): hosts = [ dict(host='127.0.0.1', port=2181, chroot='/test1') ] self.assertEqual('127.0.0.1:2181/test1', zk.buildZooKeeperHosts(hosts))
def test_buildZooKeeperHosts_single(self): hosts = [dict(host='127.0.0.1', port=2181, chroot='/test1')] self.assertEqual('127.0.0.1:2181/test1', zk.buildZooKeeperHosts(hosts))