def test_failure_limit_by_username_once(self):
        for i in range(0, config.FAILURE_LIMIT):
            ip = '74.125.239.{0}.'.format(i)
            response = self._login(username=VALID_USERNAME, remote_addr=ip)
            # Check if we are in the same login page
            self.assertContains(response, LOGIN_FORM_KEY)

        # So, we shouldn't have gotten a lock-out yet.
        # But we should get one now
        response = self._login()
        self.assertContains(response, self.LOCKED_MESSAGE)

        # doing a get should also get locked out message
        response = self.client.get(ADMIN_LOGIN_URL)
        self.assertContains(response, self.LOCKED_MESSAGE)
Authorisation
dataset/ETHPy150Open kencochrane/django-defender/defender/tests.py/AccessAttemptTest.test_failure_limit_by_username_once--crossover with--dataset/ETHPy150Open babble/babble/include/jython/Lib/poplib.py/POP3.apop