Fix examples

This commit is contained in:
mhchia
2019-12-01 17:55:07 +08:00
parent 31bf774a16
commit 6149aacc01
2 changed files with 15 additions and 17 deletions

View File

@ -5,9 +5,9 @@ from libp2p.identity.identify.protocol import ID, _mk_identify_protobuf
from libp2p.tools.factories import host_pair_factory
@pytest.mark.asyncio
async def test_identify_protocol():
async with host_pair_factory() as (host_a, host_b):
@pytest.mark.trio
async def test_identify_protocol(is_host_secure):
async with host_pair_factory(is_host_secure) as (host_a, host_b):
stream = await host_b.new_stream(host_a.get_id(), (ID,))
response = await stream.read()
await stream.close()