pytest插件,用于帮助编写django-rq的单元测试
项目描述
pytest-django-rq
一个pytest插件,用于帮助编写django-rq的单元测试。
此插件提供了一个django_rq_worker
fixture,它有一个work()
方法来运行当前进程中所有排队的作业。
用法
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 ...
项目详情
关闭
pytest-django-rq-0.2.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 63a76b3c89c592e384b7b370d33e634cc0bbd9bdf50ef06355d79e491b28cb0e |
|
MD5 | ea2f2b0e6b0ba326a1124b2f393fcc78 |
|
BLAKE2b-256 | 9bd250153d25fbed4f728b3a19419fc3f1f3f10a81ff49ea4400a7cf80ba29e9 |
关闭
pytest_django_rq-0.2.0-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | d02f85b3bd3f2082359c3e509df0e3bc7f1b386d141f64f4aea4e95bf7e2fcc8 |
|
MD5 | 247f957c2515cb6e949d3ea47f312331 |
|
BLAKE2b-256 | eb713a44c11d8e2fb30eec3e3fe535ff16d4a1d79f154a10614a3eb1360f3e7e |