예제 #1
0
 def test_task_join_will_block(self, patching):
     patching('celery._state._task_join_will_block', 0)
     assert _state._task_join_will_block == 0
     _state._set_task_join_will_block(True)
     assert _state._task_join_will_block is True
     # fixture 'app' sets this, so need to use orig_ function
     # set there by that fixture.
     res = _state.orig_task_join_will_block()
     assert res is True
예제 #2
0
파일: test_app.py 프로젝트: Scalr/celery
 def test_task_join_will_block(self, patching):
     patching('celery._state._task_join_will_block', 0)
     assert _state._task_join_will_block == 0
     _state._set_task_join_will_block(True)
     assert _state._task_join_will_block is True
     # fixture 'app' sets this, so need to use orig_ function
     # set there by that fixture.
     res = _state.orig_task_join_will_block()
     assert res is True