def test_invalid_key_format(self): """ load_publickey explodes on incorrect keys. """ with pytest.raises(Error): load_publickey(FILETYPE_ASN1, cleartextPublicKeyPEM)