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

@ -39,9 +39,9 @@ async def test_simple_two_nodes():
data = b"some data"
floodsub_a = FloodSub(supported_protocols)
pubsub_a = Pubsub(node_a, floodsub_a, ID(b"a" * 32))
pubsub_a = Pubsub(node_a, floodsub_a, ID(b"\x12\x20" + b"a" * 32))
floodsub_b = FloodSub(supported_protocols)
pubsub_b = Pubsub(node_b, floodsub_b, ID(b"b" * 32))
pubsub_b = Pubsub(node_b, floodsub_b, ID(b"\x12\x20" + b"a" * 32))
await connect(node_a, node_b)
await asyncio.sleep(0.25)