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')
UNIXPasswordDatabase.requestAvatarId loops through each getpwnam
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/conch/test/test_checkers.py/UNIXPasswordDatabaseTests.test_loopThroughFunctions