mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Rewrite factories, made some of the test running
This commit is contained in:
@ -2,12 +2,12 @@ import pytest
|
||||
|
||||
from libp2p.identity.identify.pb.identify_pb2 import Identify
|
||||
from libp2p.identity.identify.protocol import ID, _mk_identify_protobuf
|
||||
from libp2p.tools.factories import pair_of_connected_hosts
|
||||
from libp2p.tools.factories import host_pair_factory
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_identify_protocol():
|
||||
async with pair_of_connected_hosts() as (host_a, host_b):
|
||||
async with host_pair_factory() as (host_a, host_b):
|
||||
stream = await host_b.new_stream(host_a.get_id(), (ID,))
|
||||
response = await stream.read()
|
||||
await stream.close()
|
||||
|
||||
Reference in New Issue
Block a user