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

Method test_unlock_not_protected

tests/test_10_exceptions.py:158–164  ·  view source on GitHub ↗
(self, rsa_sec, recwarn)

Source from the content-addressed store, hash-verified

156 assert w.filename == __file__
157
158 def test_unlock_not_protected(self, rsa_sec, recwarn):
159 with rsa_sec.unlock("QwertyUiop") as _unlocked:
160 assert _unlocked is rsa_sec
161
162 w = recwarn.pop(UserWarning)
163 assert str(w.message) == "This key is not protected with a passphrase"
164 assert w.filename == __file__
165
166 def test_protect_pubkey(self, rsa_pub, recwarn):
167 rsa_pub.protect('QwertyUiop', SymmetricKeyAlgorithm.CAST5, HashAlgorithm.SHA1)

Callers

nothing calls this directly

Calls 1

unlockMethod · 0.80

Tested by

no test coverage detected