blob: d5e567ad4a058b1af776c33a33c1e036cc8f47a2 [file] [log] [blame]
Alex Gaynorde1906a2014-08-12 16:12:54 -07001from OpenSSL._util import exception_from_error_queue, lib
2from OpenSSL.test.util import TestCase
3
4
5
6class TestErrors(TestCase):
7 def test_exception_from_error_queue_nonexistant_reason(self):
Alex Gaynorbae2dc32014-08-14 13:44:54 -07008 lib.ERR_put_error(lib.ERR_LIB_EVP, 0, 1112, b"", 10)
Alex Gaynorde1906a2014-08-12 16:12:54 -07009 exc = self.assertRaises(ValueError, exception_from_error_queue, ValueError)
10 self.assertEqual(exc.args[0][0][2], "")