[tor-commits] [bridgedb/master] Update multiple integration tests to point to the new .gnupg directory.

isis at torproject.org isis at torproject.org
Sat Mar 21 02:03:02 UTC 2015


commit 2a39538e267fb43a9f96a1410b1e4e979fe65eb1
Author: Isis Lovecruft <isis at torproject.org>
Date:   Sun Feb 22 10:21:51 2015 +0000

    Update multiple integration tests to point to the new .gnupg directory.
    
     * UPDATE test_Main.py, test_email_autoresponder.py, and
       email_helpers.py to use the new .gnupg/ directory (rather than
       gnupghome/).
     * ADD new GnuPG options to b.test.email_helpers._createConfig().
---
 lib/bridgedb/test/email_helpers.py            |   15 ++++++++++++---
 lib/bridgedb/test/test_Main.py                |    5 ++++-
 lib/bridgedb/test/test_email_autoresponder.py |    2 +-
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/lib/bridgedb/test/email_helpers.py b/lib/bridgedb/test/email_helpers.py
index 867ff58..5e4262d 100644
--- a/lib/bridgedb/test/email_helpers.py
+++ b/lib/bridgedb/test/email_helpers.py
@@ -26,7 +26,10 @@ from bridgedb.test.test_HTTPServer import DummyBridge
 EMAIL_DIST = True
 EMAIL_INCLUDE_FINGERPRINTS = True
 EMAIL_GPG_SIGNING_ENABLED = True
-EMAIL_GPG_SIGNING_KEY = 'TESTING.subkeys.sec'
+EMAIL_GPG_HOMEDIR = '.gnupg'
+EMAIL_GPG_PRIMARY_KEY_FINGERPRINT = '0017098C5DF4197E3C884DCFF1B240D43F148C21'
+EMAIL_GPG_PASSPHRASE = None
+EMAIL_GPG_PASSPHRASE_FILE = None
 EMAIL_DOMAIN_MAP = {
    'googlemail.com': 'gmail.com',
    'mail.google.com': 'gmail.com',
@@ -53,7 +56,10 @@ TEST_CONFIG_FILE = io.StringIO(unicode("""\
 EMAIL_DIST = %s
 EMAIL_INCLUDE_FINGERPRINTS = %s
 EMAIL_GPG_SIGNING_ENABLED = %s
-EMAIL_GPG_SIGNING_KEY = %s
+EMAIL_GPG_HOMEDIR = %s
+EMAIL_GPG_PRIMARY_KEY_FINGERPRINT = %s
+EMAIL_GPG_PASSPHRASE = %s
+EMAIL_GPG_PASSPHRASE_FILE = %s
 EMAIL_DOMAIN_MAP = %s
 EMAIL_DOMAIN_RULES = %s
 EMAIL_DOMAINS = %s
@@ -71,7 +77,10 @@ EMAIL_PORT = %s
 """ % (repr(EMAIL_DIST),
        repr(EMAIL_INCLUDE_FINGERPRINTS),
        repr(EMAIL_GPG_SIGNING_ENABLED),
-       repr(EMAIL_GPG_SIGNING_KEY),
+       repr(EMAIL_GPG_HOMEDIR),
+       repr(EMAIL_GPG_PRIMARY_KEY_FINGERPRINT),
+       repr(EMAIL_GPG_PASSPHRASE),
+       repr(EMAIL_GPG_PASSPHRASE_FILE),
        repr(EMAIL_DOMAIN_MAP),
        repr(EMAIL_DOMAIN_RULES),
        repr(EMAIL_DOMAINS),
diff --git a/lib/bridgedb/test/test_Main.py b/lib/bridgedb/test/test_Main.py
index 7525b72..0b14319 100644
--- a/lib/bridgedb/test/test_Main.py
+++ b/lib/bridgedb/test/test_Main.py
@@ -415,7 +415,10 @@ EMAIL_PORT = 55557
 EMAIL_N_BRIDGES_PER_ANSWER = 3
 EMAIL_INCLUDE_FINGERPRINTS = True
 EMAIL_GPG_SIGNING_ENABLED = False
-EMAIL_GPG_SIGNING_KEY = '../gnupghome/TESTING.subkeys.sec'
+EMAIL_GPG_HOMEDIR = '../.gnupg'
+EMAIL_GPG_PRIMARY_KEY_FINGERPRINT = '0017098C5DF4197E3C884DCFF1B240D43F148C21'
+EMAiL_GPG_PASSPHRASE = None
+EMAIL_GPG_PASSPHRASE_FILE = None
 HTTPS_SHARE = 10
 EMAIL_SHARE = 5
 RESERVED_SHARE = 2
diff --git a/lib/bridgedb/test/test_email_autoresponder.py b/lib/bridgedb/test/test_email_autoresponder.py
index c94c909..2895802 100644
--- a/lib/bridgedb/test/test_email_autoresponder.py
+++ b/lib/bridgedb/test/test_email_autoresponder.py
@@ -37,7 +37,7 @@ class CreateResponseBodyTests(unittest.TestCase):
     def _moveGPGTestKeyfile(self):
         here          = os.getcwd()
         topDir        = here.rstrip('_trial_temp')
-        self.gpgFile  = os.path.join(topDir, 'gnupghome', 'TESTING.subkeys.sec')
+        self.gpgFile  = os.path.join(topDir, '.gnupg', 'TESTING.subkeys.sec')
         self.gpgMoved = os.path.join(here, 'TESTING.subkeys.sec')
         shutil.copy(self.gpgFile, self.gpgMoved)
 





More information about the tor-commits mailing list