summaryrefslogtreecommitdiff
path: root/mail/src/leap
diff options
context:
space:
mode:
authorBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-21 12:54:10 -0300
committerBruno Wagner Goncalves <bwagner@thoughtworks.com>2014-08-21 12:54:10 -0300
commit43e5beb9b5bc886f89704c00f764da1feab4674c (patch)
tree571cd2ac1d9964c8638d769a378e6428340c7b31 /mail/src/leap
parent741dce105dbf9d4118443f8d5ef588d43d6d8e45 (diff)
Find the gpg binary on the system, even through symlinks
Diffstat (limited to 'mail/src/leap')
-rw-r--r--mail/src/leap/mail/smtp/tests/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/src/leap/mail/smtp/tests/__init__.py b/mail/src/leap/mail/smtp/tests/__init__.py
index 85419cbd..5dc74659 100644
--- a/mail/src/leap/mail/smtp/tests/__init__.py
+++ b/mail/src/leap/mail/smtp/tests/__init__.py
@@ -21,6 +21,7 @@ Base classes and keys for SMTP gateway tests.
"""
import os
+import distutils.spawn
import shutil
import tempfile
from mock import Mock
@@ -39,9 +40,14 @@ from leap.keymanager import (
from leap.common.testing.basetest import BaseLeapTest
+def _find_gpg():
+ gpg_path = distutils.spawn.find_executable('gpg')
+ return os.path.realpath(gpg_path)
+
+
class TestCaseWithKeyManager(BaseLeapTest):
- GPG_BINARY_PATH = '/usr/bin/gpg'
+ GPG_BINARY_PATH = _find_gpg()
def setUp(self):
# mimic BaseLeapTest.setUpClass behaviour, because this is deprecated