Add fixtures for pubsub and router

And a starting `test_pubsub.py`
This commit is contained in:
mhchia
2019-07-27 18:41:16 +08:00
parent 21e97407ef
commit 96563c0d84
5 changed files with 126 additions and 6 deletions

View File

@ -80,7 +80,7 @@ async def create_libp2p_hosts(num_hosts):
tasks_create = []
for i in range(0, num_hosts):
# Create node
tasks_create.append(asyncio.ensure_future(new_node(transport_opt=["/ip4/127.0.0.1/tcp/0"])))
tasks_create.append(new_node(transport_opt=["/ip4/127.0.0.1/tcp/0"]))
hosts = await asyncio.gather(*tasks_create)
tasks_listen = []