Test the right error.
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 2055b6d..bc1cef0 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -2303,6 +2303,17 @@
self.assertEqual(exc.args[0], EPIPE)
+ def test_shutdown_shutdown(self):
+ """
+ :obj:`Connection.shutdown` raises :obj:`Error` when called for a second
+ time on the same connection.
+ """
+ server, client = self._loopback()
+ client.send(b"AN BYTES")
+ server.shutdown()
+ self.assertRaises(Error, server.shutdown)
+
+
def test_set_shutdown(self):
"""
:py:obj:`Connection.set_shutdown` sets the state of the SSL connection shutdown