Skip to main content

A pytest plugin to help writing unit test for django-rq

Project description


A pytest plugin to help writing unit test for django-rq.

build Code style: black

This plugin provides a django_rq_worker fixture which has a work() method to run all enqueued jobs in current process.


def test_async_api(django_rq_worker):
    client = django.test.Client()

    # Call an async API
    response =
    assert response.status_code == 201  # Accepted

    # now let's run all enqueued jobs

    # assert the async jobs has taken place.
    assert ...

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-django-rq-0.2.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

pytest_django_rq-0.2.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page