MCPcopy Create free account
hub / github.com/SecurityInnovation/PGPy / test_unload_key_half

Method test_unload_key_half

tests/test_04_PGP_objects.py:296–312  ·  view source on GitHub ↗
(self, keyring)

Source from the content-addressed store, hash-verified

294 assert "D0FDCA20" not in keyring
295
296 def test_unload_key_half(self, keyring):
297 with keyring.key('RSA von TestKey') as key:
298 keyring.unload(key)
299
300 # key was unloaded for real
301 assert id(key) not in keyring._keys
302
303 # but it was not a unique alias, because we only unloaded half of the key
304 # userid components
305 assert 'RSA von TestKey' in keyring
306 assert '2048-bit RSA' in keyring
307 assert 'rsa@test.key' in keyring
308
309 # fingerprint, keyid, shortid
310 assert 'F429 4BC8 094A 7E05 85C8 5E86 3747 3B37 58C4 4F36' in keyring
311 assert '37473B3758C44F36' in keyring
312 assert '58C44F36' in keyring

Callers

nothing calls this directly

Calls 2

keyMethod · 0.80
unloadMethod · 0.80

Tested by

no test coverage detected