diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-25 09:15:16 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-25 09:15:16 (GMT) |
commit | 2e2baa9208763119c899d0026ec726dd4ccdc384 (patch) | |
tree | 900c939b8e392a99666a1e7e252e85374898238b | |
parent | c13ef66649985025382c64f6af8e3b956411e05b (diff) | |
download | cpython-2e2baa9208763119c899d0026ec726dd4ccdc384.zip cpython-2e2baa9208763119c899d0026ec726dd4ccdc384.tar.gz cpython-2e2baa9208763119c899d0026ec726dd4ccdc384.tar.bz2 |
Issue #12049: test_ssl now checks also that RAND_bytes() raises an error if
there is not enough entropy.
-rw-r--r-- | Lib/test/test_ssl.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 8c21975..5193c15 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -109,6 +109,8 @@ class BasicSocketTests(unittest.TestCase): if v: data = ssl.RAND_bytes(16) self.assertEqual(len(data), 16) + else: + self.assertRaises(ssl.SSLError, ssl.RAND_bytes, 16) try: ssl.RAND_egd(1) |