def test_shutdown(self):
    '\n        `Connection.shutdown` performs an SSL-level connection shutdown.\n        '
    (server, client) = loopback()
    assert (not server.shutdown())
    assert (server.get_shutdown() == SENT_SHUTDOWN)
    with pytest.raises(ZeroReturnError):
        client.recv(1024)
    assert (client.get_shutdown() == RECEIVED_SHUTDOWN)
    client.shutdown()
    assert (client.get_shutdown() == (SENT_SHUTDOWN | RECEIVED_SHUTDOWN))
    with pytest.raises(ZeroReturnError):
        server.recv(1024)
    assert (server.get_shutdown() == (SENT_SHUTDOWN | RECEIVED_SHUTDOWN))
`Connection.shutdown` performs an SSL-level connection shutdown.
def test_shutdown(self):
    '\n        \n        '
    (server, client) = loopback()
    assert (not server.shutdown())
    assert (server.get_shutdown() == SENT_SHUTDOWN)
    with pytest.raises(ZeroReturnError):
        client.recv(1024)
    assert (client.get_shutdown() == RECEIVED_SHUTDOWN)
    client.shutdown()
    assert (client.get_shutdown() == (SENT_SHUTDOWN | RECEIVED_SHUTDOWN))
    with pytest.raises(ZeroReturnError):
        server.recv(1024)
    assert (server.get_shutdown() == (SENT_SHUTDOWN | RECEIVED_SHUTDOWN))