def test_select_pgpmessage(self, keyring): m1 = PGPMessage() with open('tests/testdata/messages/message.rsa.cast5.asc', 'r') as m1f: m1.parse(m1f.read()) with keyring.key(m1) as rsakey: assert rsakey.fingerprint == "00EC FAF5 48AE B655 F861 8193 EEE0 97A0 17B9 79CA" assert rsakey.parent.fingerprint == "F429 4BC8 094A 7E05 85C8 5E86 3747 3B37 58C4 4F36"
def test_parse_wrong_magic(self): msgtext = _read('tests/testdata/messages/message.signed.asc').replace( 'MESSAGE', 'EMSSAGE') msg = PGPMessage() with pytest.raises(ValueError): msg.parse(msgtext)
def test_parse_wrong_magic(self): msgtext = _read('tests/testdata/messages/message.signed.asc').replace('MESSAGE', 'EMSSAGE') msg = PGPMessage() with pytest.raises(ValueError): msg.parse(msgtext)