mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-08 23:11:27 +00:00
Noise: add noise option in the factories and tests
This commit is contained in:
@ -4,8 +4,8 @@ from libp2p.tools.factories import HostFactory
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def is_host_secure():
|
||||
return False
|
||||
def security_protocol():
|
||||
return None
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@ -14,6 +14,8 @@ def num_hosts():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def hosts(num_hosts, is_host_secure, nursery):
|
||||
async with HostFactory.create_batch_and_listen(is_host_secure, num_hosts) as _hosts:
|
||||
async def hosts(num_hosts, security_protocol, nursery):
|
||||
async with HostFactory.create_batch_and_listen(
|
||||
num_hosts, security_protocol=security_protocol
|
||||
) as _hosts:
|
||||
yield _hosts
|
||||
|
||||
Reference in New Issue
Block a user