Skip to content

Make into generic celery-worker-testcase #3

@graingert

Description

@graingert

I'm using celery in a project without the Django settings modules

It would be great if I could use a CeleryTestCase as follows:

from my_service.app import app
from my_service.tasks import my_task

class MyTaskTestCase(CeleryTestCaseMixin, TestCase):
    apps = (app, ) # instead of using Django settings use a specific celery app.
    # Should be monkey patched to use the in memory celery queue
    def test_my_task(self):
        my_task.delay()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions