How can I capture without running Celery tasks created during a unit test?
For example, I'd like to write a test which looks something like this:
def test_add_user_avatar():
add_user_avatar(…)
tasks = get_deferred_tasks(…)
assert_equal(tasks[0], ResizeImageTask(…))
Specifically, I do not want to use ALWAYS_EAGER
— some of my tasks are quite slow, and have their own set of tests cases. I specifically want to assert that the correct tasks are being created by my front-end code.