

def test_collect_hosts__with_spaces(self):
    hosts = 'localhost:1234, localhost'
    results = collect_hosts(hosts)
    self.assertEqual(set(results), set([('localhost', 1234, socket.AF_UNSPEC), ('localhost', 9092, socket.AF_UNSPEC)]))

dataset/ETHPy150Open dpkp/kafka-python/test/test_conn_legacy.py ConnTest.test_collect_hosts__with_spaces/original