

def testRecursiveGroupSigs(self):
    fingerprint = '95B457D16843B21EA3FC73BBC7C32FC1F94E405E'
    keyCache = openpgpkey.getKeyCache()
    keyCache.getPrivateKey(fingerprint, '111111')
    self.addQuickTestComponent('test:doc', '1.0-1-1')
    self.makeSourceTrove('testcase', testRecipe)
    repos = self.openRepository()
    built = self.cookItem(repos, self.cfg, 'testcase', ignoreDeps=True)
    group = self.build(testGroup, 'GroupTest')
    group = self.build(outerGroup, 'OuterGroup')
    signatureKey = self.cfg.signatureKey
    self.cfg.signatureKey = fingerprint
    self.cfg.quiet = True
    v = versions.VersionFromString('/localhost@rpl:linux/1.0-1-1')
    f = deps.parseFlavor('')
    try:
        cvccmd.sourceCommand(self.cfg, ['sign', 'group-outer'], {
            'recurse': True,
        })
        for trvName in ('group-outer', 'group-test', 'test:doc', 'testcase', 'testcase:runtime'):
            try:
                t = repos.getTrove(trvName, v, f)
                signature = t.getDigitalSignature(fingerprint)
                self._checkDigitalSig(t, fingerprint)
            except openpgpfile.KeyNotFound:
                self.fail(('Recursive group signing failed to cover %s' % trvName))
        v = versions.VersionFromString('/localhost@rpl:linux/1.0-1')
        f = deps.parseFlavor('')
        t = repos.getTrove('testcase:source', v, f)
        try:
            t.getDigitalSignature(signature)
            self.fail('signing group inadvendently signed source trove')
        except openpgpfile.KeyNotFound:
            pass
    finally:
        self.cfg.signatureKey = signatureKey

dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/sigtest.py SigTest.testRecursiveGroupSigs/VarMisuse@280/478 `fingerprint`->`signature`