Unit testing with django-celery?

Posted by Jason Webb on Stack Overflow See other posts from Stack Overflow or by Jason Webb
Published on 2010-10-29T20:57:31Z Indexed on 2010/12/30 2:53 UTC
Read the original article Hit count: 340

Filed under:
|
|
|

I am trying to come up with a testing methodology for our django-celery project. I have read the notes in the documentation, but it didn't give me a good idea of what to actually do. I am not worried about testing the tasks in the actual daemons, just the functionality of my code. Mainly I am wondering:

  1. How can we bypass task.delay() during the test (I tried setting CELERY_ALWAYS_EAGER = True but it made no difference)?
  2. How do we use the test settings that are recommended (if that is the best way) without actually changing our settings.py?
  3. Can we still use manage.py test or do we have to use a custom runner?

Overall any hints or tips for testing with celery would be very helpful.

© Stack Overflow or respective owner

Related posts about python

Related posts about django