def testListRepoKeys(self):
        fingerprint = '95B457D16843B21EA3FC73BBC7C32FC1F94E405E'
        refUserIds = ['RSA 1024 with Iterated S2K SHA Checksum CAST5']
        repos = self.openRepository()
        fingList = repos.listUsersMainKeys(self.cfg.buildLabel, 'test')
        if fingList != [fingerprint]:
            self.fail("getUsersMainKeys returned incorrect results: expected %s but got %s" % (str([fingerprint]), str(fingList)))
        subKeyList = repos.listSubkeys(self.cfg.buildLabel, fingerprint)
        if subKeyList != []:
            self.fail("getSubkeys returned values where none should have been")
        keyUserIds = repos.getOpenPGPKeyUserIds(self.cfg.buildLabel, fingerprint)
        if keyUserIds != refUserIds:
            self.fail("getOpenPGPKeyUserIds return incorrect results: expected %s but got %s" %(refUserIds,keyUserIds))

        limitedRepos = self.setupUser(repos, self.cfg.buildLabel, 'member', 'foo', None, None)
        self.assertRaises(errors.InsufficientPermission, limitedRepos.listUsersMainKeys,
                          self.cfg.buildLabel, 1)
        badPwRepos = self.getRepositoryClient(user = 'test', password = 'busted')
        self.assertRaises(errors.InsufficientPermission,
            badPwRepos.listUsersMainKeys, self.cfg.buildLabel, 1)
dataset/ETHPy150Open sassoftware/conary/conary_test/cvctest/sigtest.py/SigTest.testListRepoKeys/original