'Valid keys with invalid signatures should cause
L{SSHPublicKeyDatabase.requestAvatarId} to return a {UnauthorizedLogin}
failure'

def test_requestAvatarIdInvalidSignature(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.privateDSA_openssh).sign('foo'))
    d = self.checker.requestAvatarId(credentials)
    return self.assertFailure(d, UnauthorizedLogin)
