You can use Future as a return value

        fut = asyncio.Future(loop=self.loop)
        fut.set_result({some result})
        coro = mock.Mock()
        coro.return_value = fut


On Feb 7, 2014, at 2:46 AM, Benoit C. <[email protected]> wrote:

> Hello,
> 
> I'm trying to mock a coroutine using mock.Mock(), but I can't assert that the 
> coroutine is effectively called.
> Do you have any hint to ensure the coroutine is effectively called ?
> 
> Thanks for your help.
> 
> BenoƮt

Reply via email to