

def test_get_errors_to_process(self):
    date = datetime.utcnow()
    for i in range(0, 5):
        error = create_error({
            'id': i,
        }, attempts=(i + 1))
        error.date_next_attempt = date.replace(day=(i + 1))
        error.save()
    errors = PillowError.get_errors_to_process(date.replace(day=1)).all()
    self.assertEqual(len(errors), 1)
    errors = PillowError.get_errors_to_process(date.replace(day=5)).all()
    self.assertEqual(len(error), 3)

dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/pillow_retry/tests.py PillowRetryTestCase.test_get_errors_to_process/VarMisuse@134/157 `errors`->`error`