def _loginTest(self, opt):
        self.assertEquals(len(opt['credCheckers']), 1)
        checker = opt['credCheckers'][0]
        self.assertFailure(checker.requestAvatarId(self.joeWrong),
                           error.UnauthorizedLogin)
        def _gotAvatar(username):
            self.assertEquals(username, self.admin.username)
        return checker.requestAvatarId(self.admin).addCallback(_gotAvatar)
Dispatches a hook dictionary on a given piece of data.
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/words/test/test_tap.py/WordsTap._loginTest--crossover with--dataset/ETHPy150Open BergWerkGIS/QGIS-CKAN-Browser/CKAN-Browser/request/hooks.py/dispatch_hook