Running celery task synchronous when testing django app

Celery support running task synchronous by config variable CELERY_ALWAYS_EAGER. But where to put this variable? and could I can select run celery task synchronous with some testcase?

I do some googling but did not find any good result. So I post this on my blog to help someone like me.

»

Author image Kien Nguyen