Combine test_subscription.py to test_pubsub.py

And add a bunch of tests for pubsub
This commit is contained in:
mhchia
2019-07-28 18:07:48 +08:00
parent 96563c0d84
commit 550289a439
5 changed files with 125 additions and 20 deletions

View File

@ -13,6 +13,8 @@ async def connect(node1, node2):
addr = node2.get_addrs()[0]
info = info_from_p2p_addr(addr)
await node1.connect(info)
assert node1.get_id() in node2.get_network().connections
assert node2.get_id() in node1.get_network().connections
async def cleanup():
@ -25,6 +27,7 @@ async def cleanup():
with suppress(asyncio.CancelledError):
await task
async def set_up_nodes_by_transport_opt(transport_opt_list):
nodes_list = []
for transport_opt in transport_opt_list: