def testDeletingUserKeepsKey(self):
        repos = self.openRepository()
        fingerprint = 'F7440D78FE813C882212C2BF8AC2828190B1E477'
        keyRing = open(resources.get_archive() + '/pubring.gpg')
        keyData = openpgpfile.exportKey(fingerprint, keyRing)
        keyData.seek(0)
        keyData = keyData.read()
        armored = openpgpfile.exportKey(fingerprint, keyRing, armored=True)
        armored.seek(0)
        armored = armored.read()

        repos.addNewPGPKey(self.cfg.buildLabel, 'test', keyData)
        self.assertEquals(repos.getAsciiOpenPGPKey(self.cfg.buildLabel,
            fingerprint), armored)
        repos.deleteUserByName(self.cfg.buildLabel, 'test')
        self.assertEquals(repos.getAsciiOpenPGPKey(self.cfg.buildLabel,
            fingerprint), armored)
Deleting a user should not delete the PGP keys they uploaded.
dataset/ETHPy150Open sassoftware/conary/conary_test/repositorytest/netrepostest/netservertest.py/NetServerTest.testDeletingUserKeepsKey