mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Add fixtures for pubsub and router
And a starting `test_pubsub.py`
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user