def __init__(self, hosts=None, version="1.6", timeout=None, client_builder=None): self.hosts = parse_hosts(hosts or ["localhost"]) if client_builder is None: client_builder = Client self.c = client_builder( version, timeout, log=self.log, pool=self.pool) self.version = version self.timeout = timeout
def __init__(self, hosts=None, version="1.6", timeout=None, client_builder=None): self.hosts = parse_hosts(hosts or ["localhost"]) if client_builder is None: client_builder = Client self.c = client_builder(version, timeout, log=self.log, pool=self.pool) self.version = version self.timeout = timeout
def test_parse_hosts_invalid(self): """Invalid hosts of all sorts should be handled corectly """ self.assertEqual([], parse_hosts(None)) self.assertEqual([], parse_hosts(""))