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 ...
Metadata
Release files for pytest-django-rq 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest-django-rq-0.2.0.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_django_rq-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / pytest-django-rq-0.2.0.tar.gz
| Download URL | pytest-django-rq-0.2.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63a76b3c89c592e384b7b370d33e634cc0bbd9bdf50ef06355d79e491b28cb0e
|
|
BLAKE2b-256 checksum How to use checksums |
9bd250153d25fbed4f728b3a19419fc3f1f3f10a81ff49ea4400a7cf80ba29e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / pytest_django_rq-0.2.0-py3-none-any.whl
| Download URL | pytest_django_rq-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d02f85b3bd3f2082359c3e509df0e3bc7f1b386d141f64f4aea4e95bf7e2fcc8
|
|
BLAKE2b-256 checksum How to use checksums |
eb713a44c11d8e2fb30eec3e3fe535ff16d4a1d79f154a10614a3eb1360f3e7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|