def test_set_info_callback(self):
    '\n        `Context.set_info_callback` accepts a callable which will be\n        invoked when certain information about an SSL connection is available.\n        '
    (server, client) = socket_pair()
    clientSSL = Connection(Context(TLSv1_METHOD), client)
    clientSSL.set_connect_state()
    called = []

    def info(conn, where, ret):
        called.append((conn, where, ret))
    context = Context(TLSv1_METHOD)
    context.set_info_callback(info)
    context.use_certificate(load_certificate(FILETYPE_PEM, cleartextCertificatePEM))
    context.use_privatekey(load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM))
    serverSSL = Connection(context, server)
    serverSSL.set_accept_state()
    handshake(clientSSL, serverSSL)
    notConnections = [conn for (conn, where, ret) in called if (not isinstance(conn, Connection))]
    assert ([] == notConnections), 'Some info callback arguments were not Connection instances.'
`Context.set_info_callback` accepts a callable which will be
invoked when certain information about an SSL connection is available.
def test_set_info_callback(self):
    '\n        `Context.set_info_callback` accepts a callable which will be\n        invoked when certain information about an SSL connection is available.\n        '
    (server, client) = socket_pair()
    clientSSL = Connection(Context(TLSv1_METHOD), client)
    clientSSL.set_connect_state()
    called = []

    def info(conn, where, ret):
        called.append((conn, where, ret))
    context = Context(TLSv1_METHOD)
    context.set_info_callback(info)
    context.use_certificate(load_certificate(FILETYPE_PEM, cleartextCertificatePEM))
    context.use_privatekey(load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM))
    serverSSL = Connection(context, server)
    serverSSL.set_accept_state()
    handshake(clientSSL, serverSSL)
    notConnections = [conn for (conn, where, ret) in called if (not isinstance(conn, Connection))]
    assert ([] == notConnections), 'Some info callback arguments were not Connection instances.'