'When listening on an IPv6 address, L{IListeningPort.getHost} returns
an L{IPv6Address} with C{host} and C{port} attributes reflecting the
address the port is bound to.'

def test_portGetHostOnIPv6(self):

    reactor = self.buildReactor()
    (host, portNumber) = findFreePort(family=socket.AF_INET6, interface='::1')[:2]
    port = self.getListeningPort(reactor, ServerFactory(), portNumber, host)
    address = port.getHost()
    self.assertIsInstance(address, IPv6Address)
    self.assertEqual('::1', address.host)
    self.assertEqual(portNumber, address.port)
