'L{SSHPublicKeyDatabase.requestAvatarId} should return the avatar id
passed in if its C{_checkKey} method returns True.'

def test_requestAvatarId(self):

    def _checkKey(ignored):
        return True
    self.patch(self.checker, 'checkKey', _checkKey)
    credentials = SSHPrivateKey('test', 'ssh-rsa', keydata.publicRSA_openssh, 'foo', keys.Key.fromString(keydata.privateRSA_openssh).sign('foo'))
    d = self.checker.requestAvatarId(credentials)
    def _verify(avatarId):
        self.assertEqual(avatarId, 'test')
    return d.addCallback(_verify)
