MCPcopy
hub / github.com/aio-libs/aiohttp / create_connection

Method create_connection

tests/test_connector.py:590–600  ·  view source on GitHub ↗
(req)

Source from the content-addressed store, hash-verified

588
589 @asyncio.coroutine
590 def create_connection(req):
591 nonlocal num_connections
592 num_connections += 1
593 yield from asyncio.sleep(0, loop=self.loop)
594
595 # Make a new transport mock each time because acquired
596 # transports are stored in a set. Reusing the same object
597 # messes with the count.
598 tr = unittest.mock.Mock()
599
600 return tr, proto
601
602 conn._create_connection = create_connection
603

Callers 3

_create_connectionMethod · 0.45
_create_connectionMethod · 0.45
start_clientFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected