

def testUnaccessiblePubkey(self):
    fingerprint = '95B457D16843B21EA3FC73BBC7C32FC1F94E405E'
    pubRing = self.cfg.pubRing
    pubRing = '/not/a/valid/path/pubring.gpg'
    keyCache = openpgpkey.OpenPGPKeyFileCache()
    keyCache.setPublicPath(pubRing)
    self.assertRaises(openpgpfile.KeyNotFound, keyCache.getPublicKey, fingerprint)
    repos = self.openRepository()
    keyCacheCallback = openpgpkey.KeyCacheCallback(repos, self.cfg)
    keyCache.setCallback(keyCacheCallback)
    self.assertRaises(openpgpfile.KeyNotFound, keyCache.getPublicKey, fingerprint)

dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/sigtest.py SigTest.testUnaccessiblePubkey/original