summaryrefslogtreecommitdiff
path: root/src/leap/email/smtp/tests/test_encrypt.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-01-22 12:14:02 -0200
committerdrebs <drebs@leap.se>2013-01-22 12:14:02 -0200
commit9509a4e68af74737cf96460dc5af9e1cbb836e66 (patch)
tree031a29b749eedbfc754df8d2fe069f5f91ff4320 /src/leap/email/smtp/tests/test_encrypt.py
parenta59886ce1727162ad8992fdabcc38137760a8ab4 (diff)
Clean up tests and add basic GPG infrastructure.
Diffstat (limited to 'src/leap/email/smtp/tests/test_encrypt.py')
-rw-r--r--src/leap/email/smtp/tests/test_encrypt.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/leap/email/smtp/tests/test_encrypt.py b/src/leap/email/smtp/tests/test_encrypt.py
deleted file mode 100644
index 1051b587..00000000
--- a/src/leap/email/smtp/tests/test_encrypt.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import os
-import unittest
-import gnupg
-
-class EncryptMessageTestCase(unittest.TestCase):
-
- def test_encrypt_to_signonly(self):
- plaintext = BytesIO(b'Hello World\n')
- ciphertext = BytesIO()
- ctx = gpgme.Context()
- recipient = ctx.get_key('15E7CE9BF1771A4ABC550B31F540A569CB935A42')
- try:
- ctx.encrypt([recipient], gpgme.ENCRYPT_ALWAYS_TRUST,
- plaintext, ciphertext)
- except gpgme.GpgmeError as exc:
- self.assertEqual(exc.args[0], gpgme.ERR_SOURCE_UNKNOWN)
- self.assertEqual(exc.args[1], gpgme.ERR_GENERAL)
- else:
- self.fail('gpgme.GpgmeError not raised')
-
-
-def test_suite():
- loader = unittest.TestLoader()
- return loader.loadTestsFromName(__name__)
-