def test_failOnKeyError(self):
        def getpwnam(username):
            raise KeyError(username)
        checker = checkers.UNIXPasswordDatabase([getpwnam])
        credential = UsernamePassword(b'username', b'username')
        self.assertUnauthorizedLogin(checker.requestAvatarId(credential))
Look up Enum by number.
dataset/ETHPy150Open twisted/twisted/twisted/conch/test/test_checkers.py/UNIXPasswordDatabaseTests.test_failOnKeyError--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/protorpc/protorpc/messages.py/_EnumClass.lookup_by_number