mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
add test for counded concurrency
Signed-off-by: sukhman <sukhmansinghsaluja@gmail.com>
This commit is contained in:
11
tests/utils/utils.py
Normal file
11
tests/utils/utils.py
Normal file
@ -0,0 +1,11 @@
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
def create_mock_connections() -> dict:
|
||||
connections = {}
|
||||
|
||||
for i in range(1, 31):
|
||||
peer_id = f"peer-{i}"
|
||||
mock_conn = MagicMock(name=f"INetConn-{i}")
|
||||
connections[peer_id] = mock_conn
|
||||
|
||||
return connections
|
||||
Reference in New Issue
Block a user