summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlyph <glyph@twistedmatrix.com>2015-04-14 16:38:22 -0400
committerGlyph <glyph@twistedmatrix.com>2015-04-14 16:38:22 -0400
commit6064ec357f9b3b69813006f95ac0b0bdd669d65d (patch)
treeeece70156c7581a83140f1141b08fec3f20c1e67
parent468bd429a7d159fd13a6f999180c92afd6c1dffb (diff)
downloadpyopenssl-6064ec357f9b3b69813006f95ac0b0bdd669d65d.tar.gz
Test the right error.
-rw-r--r--OpenSSL/test/test_ssl.py11
1 files changed, 11 insertions, 0 deletions
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 @@ class ConnectionTests(TestCase, _LoopbackMixin):
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