'A client\'s transport\'s C{getHost} and C{getPeer} return L{UNIXAddress}
instances which have the filesystem path of the host and peer ends of
the connection.'

def test_addresses(self):

    class SaveAddress(ConnectableProtocol, ):
        def makeConnection(self, transport):
            self.addresses = dict(host=transport.getHost(), peer=transport.getPeer())
            transport.loseConnection()
    server = SaveAddress()
    client = SaveAddress()
    runProtocolsWithReactor(self, server, client, self.endpoints)
    self.assertEqual(server.addresses['host'], client.addresses['peer'])
    self.assertEqual(server.addresses['peer'], client.addresses['host'])
