

def test_get_errors_to_process_queued(self):
    date = datetime.utcnow()
    error = create_error({
        'id': 1,
    }, attempts=0)
    error.date_next_attempt = date
    error.save()
    queued_error = create_error({
        'id': 2,
    }, attempts=0)
    queued_error.date_next_attempt = date
    queued_error.queued = True
    errors.save()
    errors = PillowError.get_errors_to_process(date).all()
    self.assertEqual(len(errors), 1)
    self.assertEqual(error.id, errors[0]['id'])

dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/pillow_retry/tests.py PillowRetryTestCase.test_get_errors_to_process_queued/VarMisuse@78/102 `queued_error`->`errors`