Ejemplo n.º 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
Ejemplo n.º 2
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