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

Method test_verify_wrongkey

tests/test_10_exceptions.py:190–195  ·  view source on GitHub ↗
(self, rsa_pub)

Source from the content-addressed store, hash-verified

188 rsa_enc.sign("asdf")
189
190 def test_verify_wrongkey(self, rsa_pub):
191 wrongkey, _ = PGPKey.from_file('tests/testdata/signatures/aptapproval-test.key.asc')
192 sig = PGPSignature.from_file('tests/testdata/signatures/debian-sid.sig.asc')
193
194 with pytest.raises(PGPError):
195 wrongkey.verify(_read('tests/testdata/signatures/debian-sid.subj'), sig)
196
197 def test_decrypt_unencrypted_message(self, rsa_sec, recwarn):
198 lit = PGPMessage.new('tests/testdata/lit', file=True)

Callers

nothing calls this directly

Calls 3

_readFunction · 0.85
from_fileMethod · 0.80
verifyMethod · 0.45

Tested by

no test coverage detected