

def testChangeKeyOwner(self):
    fingerprint = 'F7440D78FE813C882212C2BF8AC2828190B1E477'
    keyCache = openpgpkey.getKeyCache()
    keyCache.getPrivateKey(fingerprint, '111111')
    self.addQuickTestComponent('test:source', '1.0-1-1')
    self.cfg.signatureKey = anotherRepos
    self.cfg.quiet = True
    repos = self.openRepository()
    anotherRepos = self.setupUser(repos, self.cfg.buildLabel, 'another', 'anotherpass', None, None)
    keyRing = open(resources.get_path('conary_test', 'archive', 'pubring.gpg'))
    keyData = openpgpfile.exportKey(fingerprint, keyRing)
    keyData.seek(0)
    keyData = keyData.read()
    repos.addNewPGPKey(self.cfg.buildLabel, 'test', keyData)
    repos.changePGPKeyOwner(self.cfg.buildLabel, 'another', fingerprint)
    assert (repos.listUsersMainKeys(self.cfg.buildLabel, 'another')[0] == fingerprint)

dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/sigtest.py SigTest.testChangeKeyOwner/VarMisuse@46/102 `fingerprint`->`anotherRepos`