-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
90 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -370,7 +370,7 @@ def test_key_generation_with_escapes(self): | |
self.assertEqual(uid, 'Test Name (Funny chars: ' | ||
'\r\n\x0c\x0b\x00\x08) <[email protected]>') | ||
|
||
@unittest.skipIf(os.name == 'nt', 'Test requires POSIX-style permissions') | ||
@skipIf(os.name == 'nt', 'Test requires POSIX-style permissions') | ||
def test_key_generation_failure(self): | ||
if self.gpg.version < (2, 0): # pragma: no cover | ||
raise unittest.SkipTest('gpg 1.x hangs in this test') | ||
|
@@ -1552,6 +1552,18 @@ def test_multiple_signatures_one_invalid(self): | |
finally: | ||
os.remove(fn) | ||
|
||
@skipIf('CI' not in os.environ, "Don't test locally") | ||
def test_auto_key_locating(self): | ||
gpg = self.gpg | ||
|
||
# Let's hope ProtonMail doesn't change their key anytime soon | ||
expected_fingerprint = "90E619A84E85330A692F6D81A655882018DBFA9D" | ||
expected_type = "rsa2048" | ||
|
||
actual = self.gpg.auto_locate_key("[email protected]") | ||
|
||
self.assertEqual(actual.fingerprint, expected_fingerprint) | ||
|
||
|
||
TEST_GROUPS = { | ||
'sign': | ||
|
@@ -1574,7 +1586,7 @@ def test_multiple_signatures_one_invalid(self): | |
'basic': | ||
set(['test_environment', 'test_list_keys_initial', 'test_nogpg', 'test_make_args', 'test_quote_with_shell']), | ||
'test': | ||
set(['test_multiple_signatures_one_invalid']), | ||
set(['test_auto_key_locating']), | ||
} | ||
|
||
|
||
|