

def testUnknownSig(self):
    self.stopRepository(0)
    sigRepos = self.openRepository(0, requireSigs=True)
    fingerprint = 'F7440D78FE813C882212C2BF8AC2828190B1E477'
    keyCache = openpgpkey.getKeyCache()
    keyCache.getPrivateKey(fingerprint, '111111')
    os.chdir(self.workDir)
    self.newpkg('testcase')
    os.chdir('testcase')
    self.writeFile('testcase.recipe', testRecipe)
    self.addfile('testcase.recipe')
    repos = self.openRepository()
    self.cfg.signatureKey = fingerprint
    try:
        checkin.commit(repos, self.cfg, 'testcase', None)
        self.fail('Repository should have required a signature')
    except DigitalSignatureVerificationError:
        pass
    sigRepos.stopRepository(0)
    repos = self.openRepository(0)
    checkin.commit(repos, self.cfg, 'testcase', None)
    self.cfg.signatureKey = None

dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/sigtest.py SigTest.testUnknownSig/VarMisuse@141/225 `self`->`sigRepos`