mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
fix existing tests
This commit is contained in:
@ -1,7 +1,8 @@
|
||||
import pytest
|
||||
import asyncio
|
||||
import multiaddr
|
||||
|
||||
from tests.utils import cleanup
|
||||
from tests.utils import cleanup, set_up_nodes_by_transport_opt
|
||||
from libp2p import new_node
|
||||
from libp2p.peer.peerinfo import info_from_p2p_addr
|
||||
from libp2p.protocol_muxer.multiselect_client import MultiselectClientError
|
||||
@ -9,7 +10,6 @@ from libp2p.protocol_muxer.multiselect_client import MultiselectClientError
|
||||
|
||||
PROTOCOL_ID = '/chat/1.0.0'
|
||||
|
||||
|
||||
async def hello_world(host_a, host_b):
|
||||
async def stream_handler(stream):
|
||||
read = await stream.read()
|
||||
@ -100,8 +100,8 @@ async def no_common_protocol(host_a, host_b):
|
||||
(no_common_protocol),
|
||||
])
|
||||
async def test_chat(test):
|
||||
host_a = await new_node(transport_opt=["/ip4/127.0.0.1/tcp/0"])
|
||||
host_b = await new_node(transport_opt=["/ip4/127.0.0.1/tcp/0"])
|
||||
transport_opt_list = [["/ip4/127.0.0.1/tcp/0"], ["/ip4/127.0.0.1/tcp/0"]]
|
||||
(host_a, host_b) = await set_up_nodes_by_transport_opt(transport_opt_list)
|
||||
|
||||
addr = host_a.get_addrs()[0]
|
||||
info = info_from_p2p_addr(addr)
|
||||
|
||||
Reference in New Issue
Block a user