This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fried
Recipients fried, lisroach
Date 2019-11-19.23:04:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
If you are trying to use AsyncMock to mock a coroutine that returns awaitable objects, AsyncMock awaits on those objects instead of returning them as is. 

  mock = AsyncMock(return_value=asyncio.Future())
  v = await mock()  # blocks on trying to await the future

  mock = AsyncMock(return_value=asyncio.Future())
  v = await mock()
  assert isisnstance(v, asyncio.Future)

This problem affects side_effects and wraps.
Date User Action Args
2019-11-19 23:04:14friedsetrecipients: + fried, lisroach
2019-11-19 23:04:13friedsetmessageid: <>
2019-11-19 23:04:13friedlinkissue38857 messages
2019-11-19 23:04:13friedcreate