A pytest plugin to help writing unit test for django-rq
Project description
pytest-django-rq
A pytest plugin to help writing unit test for django-rq.
This plugin provides a django_rq_worker
fixture which has a work()
method
to run all enqueued jobs in current process.
Usage
def test_async_api(django_rq_worker):
client = django.test.Client()
# Call an async API
response = client.post(URL)
assert response.status_code == 201 # Accepted
# now let's run all enqueued jobs
django_rq_worker.work()
# assert the async jobs has taken place.
assert ...
Project details
Release history Release notifications | RSS feed
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.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for pytest_django_rq-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab1fbe2428c8513de12487801434b7e4d91b6ce5d48c5ad32130b41285fed4b2 |
|
MD5 | ac93303d99d51049f6cb67e650566874 |
|
BLAKE2b-256 | e4061770d5527db1f30b400d8eba4408c84c7db5291d542351d562987e70395b |