summaryrefslogtreecommitdiff
path: root/src/leap/mail/smtp/tests/__init__.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-08-08 11:18:41 -0300
committerTomás Touceda <chiiph@leap.se>2013-08-08 11:18:41 -0300
commit14fbcb055fcc2084e11497c53deb1b523ed85f32 (patch)
tree983363316a985beb674180877c90cb84989d1f5a /src/leap/mail/smtp/tests/__init__.py
parent2d61fd7a27aad51092ccf831c76ce1cd993dacd1 (diff)
parenta46b3fcea0db6a3545e955a1c4cb648750d93974 (diff)
Merge remote-tracking branch 'drebs/feature/3397-keymanager-should-support-bundled-gpg' into develop
Diffstat (limited to 'src/leap/mail/smtp/tests/__init__.py')
-rw-r--r--src/leap/mail/smtp/tests/__init__.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/leap/mail/smtp/tests/__init__.py b/src/leap/mail/smtp/tests/__init__.py
index 73c9421..d952405 100644
--- a/src/leap/mail/smtp/tests/__init__.py
+++ b/src/leap/mail/smtp/tests/__init__.py
@@ -41,6 +41,8 @@ from leap.common.testing.basetest import BaseLeapTest
class TestCaseWithKeyManager(BaseLeapTest):
+ GPG_BINARY_PATH = '/usr/bin/gpg'
+
def setUp(self):
# mimic BaseLeapTest.setUpClass behaviour, because this is deprecated
# in Twisted: http://twistedmatrix.com/trac/ticket/1870
@@ -110,7 +112,9 @@ class TestCaseWithKeyManager(BaseLeapTest):
'port': 25,
'username': address,
'password': '<password>',
- 'encrypted_only': True
+ 'encrypted_only': True,
+ 'cert': 'blah',
+ 'key': 'bleh',
}
class Response(object):
@@ -125,12 +129,13 @@ class TestCaseWithKeyManager(BaseLeapTest):
nickserver_url = '' # the url of the nickserver
km = KeyManager(address, nickserver_url, self._soledad,
- ca_cert_path='')
+ ca_cert_path='', gpgbinary=self.GPG_BINARY_PATH)
km._fetcher.put = Mock()
km._fetcher.get = Mock(return_value=Response())
# insert test keys in key manager.
- pgp = openpgp.OpenPGPScheme(self._soledad)
+ pgp = openpgp.OpenPGPScheme(
+ self._soledad, gpgbinary=self.GPG_BINARY_PATH)
pgp.put_ascii_key(PRIVATE_KEY)
pgp.put_ascii_key(PRIVATE_KEY_2)
@@ -371,4 +376,3 @@ THx7N776fcYHGumbqUMYrxrcZSbNveE6SaK8fphRam1dewM0
=a5gs
-----END PGP PRIVATE KEY BLOCK-----
"""
-