MCPcopy Create free account
hub / github.com/sammchardy/python-binance / AsyncMock

Class AsyncMock

tests/test_threaded_stream.py:13–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11except ImportError:
12 # Create our own AsyncMock for Python 3.7
13 class AsyncMock(Mock):
14 async def __call__(self, *args, **kwargs):
15 return super(AsyncMock, self).__call__(*args, **kwargs)
16
17 async def __aenter__(self):
18 return self
19
20 async def __aexit__(self, *args):
21 return None
22
23 async def __aiter__(self):
24 return self
25
26 async def __anext__(self):
27 raise StopAsyncIteration
28
29
30@pytest.mark.asyncio

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…