'If L{keys.Key.verify} raises an exception,
L{checkers.SSHPublicKeyChecker.requestAvatarId} fails with
L{UnauthorizedLogin}.'

def test_failureVerifyingKey(self):

    def fail(*args, **kwargs):
        raise _DummyException()
    self.patch(keys.Key, 'verify', fail)
    self.failureResultOf(self.checker.requestAvatarId(self.credentials), UnauthorizedLogin)
    self.flushLoggedErrors(_DummyException)
