Explicitly set the passphrase on one of the unittest keys.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-22 17:23:18 +00:00
parent 3780a6bed2
commit ba37ce083d
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 7 additions and 4 deletions

View File

@ -658,11 +658,12 @@ class GPGTestCase(unittest.TestCase):
log.debug("test_deletion ends")
def test_encryption(self):
"""Test encryption of a message string."""
"""Test encryption of a message string"""
key = self.generate_key("Craig Gentry", "xorr.ox",
passphrase="craiggentry")
gentry = key.fingerprint
key = self.generate_key("Marten van Dijk", "xorr.ox")
key = self.generate_key("Marten van Dijk", "xorr.ox",
passphrase="martenvandijk")
dijk = key.fingerprint
gpg = self.gpg
message = """
@ -672,8 +673,10 @@ transparent multi-hop wireless backhauls that are able to perform statistical
analysis of different kinds of data (temperature, humidity, etc.) coming from
a WSN while ensuring both end-to-end encryption and hop-by-hop
authentication."""
encrypted = str(gpg.encrypt(message, dijk))
self.assertNotEqual(message, encrypted, "Data must have changed")
encrypted = str(gpg.encrypt(message, [dijk], ))
self.assertNotEqual(message, encrypted)
self.assertNotEqual(encrypted, '')
self.assertGreater(len(encrypted), 0)
def test_encryption_alt_encoding(self):
"""Test encryption with latin-1 encoding"""