Noise: add noise option in the factories and tests

This commit is contained in:
mhchia
2020-02-19 23:15:03 +08:00
parent 1d2a976597
commit 13e8f496a7
21 changed files with 331 additions and 212 deletions

View File

@ -6,8 +6,11 @@ from libp2p.tools.factories import host_pair_factory
@pytest.mark.trio
async def test_identify_protocol(is_host_secure):
async with host_pair_factory(is_host_secure) as (host_a, host_b):
async def test_identify_protocol(security_protocol):
async with host_pair_factory(security_protocol=security_protocol) as (
host_a,
host_b,
):
stream = await host_b.new_stream(host_a.get_id(), (ID,))
response = await stream.read()
await stream.close()