def test_connect_refused(self):
    '\n        `Connection.connect` raises `socket.error` if the underlying socket\n        connect method raises it.\n        '
    client = socket_any_family()
    context = Context(TLSv1_METHOD)
    clientSSL = Connection(context, client)
    try:
        clientSSL.connect((loopback_address(client), 1))
    except error as e:
        exc = e
    assert (exc.args[0] == ECONNREFUSED)
`Connection.connect` raises `socket.error` if the underlying socket
connect method raises it.
def test_connect_refused(self):
    '\n        `Connection.connect` raises `socket.error` if the underlying socket\n        connect method raises it.\n        '
    client = socket_any_family()
    context = Context(TLSv1_METHOD)
    clientSSL = Connection(context, client)
    try:
        clientSSL.connect((loopback_address(client), 1))
    except error as e:
        exc = e
    assert (exc.args[0] == ECONNREFUSED)