'If there are no cached connections,
L{HTTPConnectionPool.getConnection} returns a new connection.'

def test_getReturnsNewIfCacheEmpty(self):

    self.assertEqual(self.pool._connections, {})
    def gotConnection(conn):
        self.assertIsInstance(conn, StubHTTPProtocol)
        self.assertNotIn(conn, self.pool._connections.values())
    unknownKey = 12245
    d = self.pool.getConnection(unknownKey, DummyEndpoint())
    return d.addCallback(gotConnection)
