'If the client indicates that it is never satisfied, by always returning
False from _areDone, then L{SSHProtocolChecker} should raise
L{NotEnoughAuthentication}.'

def test_requestAvatarIdWithNotEnoughAuthentication(self):

    checker = checkers.SSHProtocolChecker()
    def _areDone(avatarId):
        return False
    self.patch(checker, 'areDone', _areDone)
    passwordDatabase = InMemoryUsernamePasswordDatabaseDontUse()
    passwordDatabase.addUser('test', 'test')
    checker.registerChecker(passwordDatabase)
    d = checker.requestAvatarId(UsernamePassword('test', 'test'))
    return self.assertFailure(d, NotEnoughAuthentication)
