@patch('defender.config.USE_CELERY', True)
    def test_use_celery(self):

        self.assertEqual(AccessAttempt.objects.count(), 0)

        for i in range(0, int(config.FAILURE_LIMIT)):
            response = self._login()
            # 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)

        self.assertEqual(AccessAttempt.objects.count(),
                          config.FAILURE_LIMIT + 1)
        self.assertIsNotNone(str(AccessAttempt.objects.all()[0]))
Parse and add special markers to all failures found in the `FAILURES`
dataset/ETHPy150Open kencochrane/django-defender/defender/tests.py/AccessAttemptTest.test_use_celery--crossover with--dataset/ETHPy150Open okcompute/vim-python-tests-runner/compiler/runners/pytest.py/parse_failures