Replace several untested paths with _openssl_assert (#498)
* Replace several untested paths with _openssl_assert
* fix, these require a bool
* oop, fixed
* finish porting crypto.py
* typo
* yessssssss
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index e13f1e4..2febb95 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -2827,6 +2827,14 @@
"""
self.assertRaises(Error, load_pkcs7_data, FILETYPE_PEM, b"foo")
+ def test_load_pkcs7_type_invalid(self):
+ """
+ If the type passed to :obj:`load_pkcs7_data`, :obj:`ValueError` is
+ raised.
+ """
+ with pytest.raises(ValueError):
+ load_pkcs7_data(object(), b"foo")
+
class LoadCertificateTests(TestCase):
"""