Update test_import_and_export() unittest with newer key generation utility.

testing/mmn/mktime_takes_localtime_not_gmtime
Isis Lovecruft 2013-05-11 08:54:17 +00:00
parent 6c87679e7e
commit 79bf77a185
No known key found for this signature in database
GPG Key ID: A3ADB67A2CDB8B35
1 changed files with 2 additions and 1 deletions

View File

@ -440,8 +440,9 @@ class GPGTestCase(unittest.TestCase):
logger.debug("was: %r", KEYS_TO_IMPORT) logger.debug("was: %r", KEYS_TO_IMPORT)
logger.debug("now: %r", ascii) logger.debug("now: %r", ascii)
self.assertEqual(0, match, "Keys must match") self.assertEqual(0, match, "Keys must match")
#Generate a key so we can test exporting private keys #Generate a key so we can test exporting private keys
key = self.do_key_generation() key = self.generate_key('Shai Halevi', 'xorr.ox')
ascii = gpg.export_keys(key.fingerprint, True) ascii = gpg.export_keys(key.fingerprint, True)
self.assertTrue(ascii.find("PGP PRIVATE KEY BLOCK") >= 0, self.assertTrue(ascii.find("PGP PRIVATE KEY BLOCK") >= 0,
"Exported key should be private") "Exported key should be private")