test_celery.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:z3c.celery 作者: ZeitOnline 项目源码 文件源码
def test_celery__TransactionAwareTask__delay__6(celery_session_worker, zcml):
    """It allows overriding the principal."""
    auth = zope.component.getUtility(
        zope.authentication.interfaces.IAuthentication)
    principal = auth.getPrincipal('example.user')
    z3c.celery.celery.login_principal(principal)
    result = get_principal_title_task.delay(_principal_id_='zope.user')

    transaction.commit()
    assert 'User' == result.get()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号