PyDocs

Nav

Development Tools

AsyncMock.await_count

An integer keeping track of how many times the mock object has been awaited.
1 Example
>>> mock = AsyncMock()
>>> async def main():
...     await mock()
...
>>> asyncio.run(main())
>>> mock.await_count
1
>>> asyncio.run(main())
>>> mock.await_count
2
from the Python docs
See Also
No see-alsos for unittest.mock/AsyncMock.await_count
0 Notes
No notes for AsyncMock.await_count