aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/pgp/tests/test_wrapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/pgp/tests/test_wrapper.py')
-rw-r--r--src/mailman_pgp/pgp/tests/test_wrapper.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mailman_pgp/pgp/tests/test_wrapper.py b/src/mailman_pgp/pgp/tests/test_wrapper.py
index 13657ac..f1f7621 100644
--- a/src/mailman_pgp/pgp/tests/test_wrapper.py
+++ b/src/mailman_pgp/pgp/tests/test_wrapper.py
@@ -18,6 +18,9 @@
"""Tests for the combined wrapper."""
from parameterized import parameterized
+from mailman_pgp.pgp.inline import InlineWrapper
+from mailman_pgp.pgp.mime import MIMEWrapper
+from mailman_pgp.pgp.mime_multisig import MIMEMultiSigWrapper
from mailman_pgp.pgp.wrapper import PGPWrapper
from mailman_pgp.testing.pgp import load_key, load_message, WrapperTestCase
@@ -194,3 +197,14 @@ class TestCombined(PGPWrapperTestCase):
def test_sign_then_encrypt_decrypt_verify(self, message, sign_key,
encrypt_key):
self.sign_then_encrypt_decrypt_verify(message, sign_key, encrypt_key)
+
+
+class TestPGPWrapper(PGPWrapperTestCase):
+ def setUp(self):
+ self.msg = load_message('clear.eml')
+
+ def test_defaults(self):
+ PGPWrapper(self.msg)
+ for wrap_class in (InlineWrapper, MIMEWrapper, MIMEMultiSigWrapper):
+ PGPWrapper(self.msg, wrap_class)
+ self.assertRaises(ValueError, PGPWrapper, self.msg, 'Not a class')