summaryrefslogtreecommitdiffstats
path: root/lib/Python/Lib/OpenSSL/test/test_tsafe.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 14:07:48 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-12 14:07:48 +0200
commit5d86cfd98437eaa2b84b07ba19d51d50d64bc53f (patch)
tree735c4b2445a274be1440b75c7733d2805ff24307 /lib/Python/Lib/OpenSSL/test/test_tsafe.py
parentOther import fixes (2) (diff)
downloadpyload-5d86cfd98437eaa2b84b07ba19d51d50d64bc53f.tar.xz
Missing optional lib
Diffstat (limited to 'lib/Python/Lib/OpenSSL/test/test_tsafe.py')
-rw-r--r--lib/Python/Lib/OpenSSL/test/test_tsafe.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Python/Lib/OpenSSL/test/test_tsafe.py b/lib/Python/Lib/OpenSSL/test/test_tsafe.py
new file mode 100644
index 000000000..04569574d
--- /dev/null
+++ b/lib/Python/Lib/OpenSSL/test/test_tsafe.py
@@ -0,0 +1,24 @@
+# Copyright (C) Jean-Paul Calderone
+# See LICENSE for details.
+
+"""
+Unit tests for :py:obj:`OpenSSL.tsafe`.
+"""
+
+from OpenSSL.SSL import TLSv1_METHOD, Context
+from OpenSSL.tsafe import Connection
+from OpenSSL.test.util import TestCase
+
+
+class ConnectionTest(TestCase):
+ """
+ Tests for :py:obj:`OpenSSL.tsafe.Connection`.
+ """
+ def test_instantiation(self):
+ """
+ :py:obj:`OpenSSL.tsafe.Connection` can be instantiated.
+ """
+ # The following line should not throw an error. This isn't an ideal
+ # test. It would be great to refactor the other Connection tests so
+ # they could automatically be applied to this class too.
+ Connection(Context(TLSv1_METHOD), None)