如何使用pytest嵌入实时芹菜节拍工?

时间:2019-06-06 19:50:14

标签: django celery pytest

我正在使用pytest-django,并且能够使用以下instructions在我的conftest.py中使用以下代码将实时工作人员嵌入到一次性工作中,但是我不确定如何启用其他功能击败工人执行定期任务。

@pytest.fixture(autouse=True, scope='session')
def celery_config(django_db_setup, django_db_blocker,request):
with django_db_blocker.unblock():

    return {
        'broker_url': 'redis://localhost:6379',
        'result_backend': 'redis://localhost:6379'
    }

0 个答案:

没有答案