Replies: 1 comment 2 replies
-
@samuele-mattiuzzo have been banging our heads against this issue today. Did you manage to make it work @idahogray? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone, I have a django application that uses celery for background tasks. I want to have automated tests for these tasks, including tests of the
task_failure
signal receivers. A few years ago, when I initially built this system, I was using django's built in unittest test runner and copied some hacky code to run tests. I have since switched to using pytest. I am adding some new celery tasks, withtask_failure
receivers, and I wanted to see if there was a better way to build the tests than the ugly scab I built previously. The celery documentation provides information about the built-in pytest features, which looked promising.Here is a simplified version of what I have built.
When I run the test using
pytest -s tests.py
, pytest printsNo matter what I do, I just can't get the celery signals to work.
Has anyone ever tried to test celery signals using the
celery_session_worker
fixture? My ddg/google searching is failing me. Any clues anyone could provide would be greatly appreciated.Thanks in advance.
P.S. I also posted this on the django forums
Beta Was this translation helpful? Give feedback.
All reactions