summaryrefslogtreecommitdiff
path: root/src/leap/email/smtp/tests/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/email/smtp/tests/util.py')
-rw-r--r--src/leap/email/smtp/tests/util.py34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/leap/email/smtp/tests/util.py b/src/leap/email/smtp/tests/util.py
deleted file mode 100644
index b62cb731..00000000
--- a/src/leap/email/smtp/tests/util.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# copied from pygpgme's tests
-import os
-import shutil
-import tempfile
-import unittest
-
-import gpgme
-
-import smtprelay
-
-__all__ = ['GpgHomeTestCase']
-
-keydir = os.path.join(os.path.dirname(__file__), 'keys')
-
-class GpgHomeTestCase(unittest.TestCase):
-
- gpg_conf_contents = ''
- import_keys = []
-
- def keyfile(self, key):
- return open(os.path.join(keydir, key), 'rb')
-
- def setUp(self):
- self._gpghome = tempfile.mkdtemp(prefix='tmp.gpghome')
-
- # import requested keys into the keyring
- ctx = gpgme.Context()
- for key in self.import_keys:
- with self.keyfile(key) as fp:
- ctx.import_(fp)
-
- def tearDown(self):
- del os.environ['GNUPGHOME']
- shutil.rmtree(self._gpghome, ignore_errors=True)