'This method executes both positive and negative authentication
tests against whatever credentials checker has been stored in
the Options class.
@param opt: An instance of L{tap.Options}.'

def _loginTest(self, opt):

    self.assertEqual(len(opt['credCheckers']), 1)
    checker = opt['credCheckers'][0]
    self.assertFailure(checker.requestAvatarId(self.joeWrong), error.UnauthorizedLogin)
    def _gotAvatar(username):
        self.assertEqual(username, self.admin.username)
    return checker.requestAvatarId(self.admin).addCallback(_gotAvatar)
