def _get_async_result(data, request_id=None): result = AsyncResult(client=telegram) result.update = data result.id = request_id return result
def test_wait_with_update(self): ar = AsyncResult(client=None) ar.update = '123' ar.wait(timeout=0.01)
def _get_ar(data): ar = AsyncResult(client=telegram) ar.update = data return ar
def test_wait_with_update(self): async_result = AsyncResult(client=None) async_result.update = '123' async_result._ready.set() async_result.wait(timeout=0.01)