'UNIXPasswordDatabase.requestAvatarId loops through each getpwnam
function associated with it and returns a L{Deferred} which fires with
the result of the first one which returns a value other than None.
ones do not verify the password.'

def test_loopThroughFunctions(self):

    def verifyCryptedPassword(crypted, pw):
        return (crypted == pw)
    def getpwnam1(username):
        return [username, 'not    the    password']
    def getpwnam2(username):
        return [username, username]
    self.patch(checkers, 'verifyCryptedPassword', verifyCryptedPassword)
    checker = checkers.UNIXPasswordDatabase([getpwnam1, getpwnam2])
    credential = UsernamePassword('username', 'username')
    self.assertLoggedIn(checker.requestAvatarId(credential), 'username')
