class TestPGPKeyring(object): kr = PGPKeyring(_read('tests/testdata/pubtest.asc')) def test_key_keyerror(self): with pytest.raises(KeyError): with self.kr.key('DEADBEA7CAFED00D'): pass
def __init__(self, homedir=None, gpgpath="gpg"): """Init PGPyCrypto class. :param homedir: home dir :type key: str :param gpgpath: kept for compatibility with BinGPG API :type gpgpath: str """ # NOTE: called as .._pgpy.. to know that is instance of PGPKey self.pgpydir = homedir self.memkr = PGPKeyring() self._ensure_init()
def keyring(): return PGPKeyring()